+ Reply to Thread
Results 1 to 6 of 6

IF formula with multiple If_True_Values & Multiple Conditions HELP!

  1. #1
    Registered User
    Join Date
    10-13-2021
    Location
    Essex, England
    MS-Off Ver
    Google Sheets
    Posts
    2

    IF formula with multiple If_True_Values & Multiple Conditions HELP!

    So I have been trying al day, searching every forum topic, every youtube video and every tips and tricks sheet, starting to think it is not possible.

    I am relatively new with excel but pick things up quite quick, but this has flummexed me.

    So in as simple terms as I can put it i am trying to make it so that IF Job!C2:C100(Product name from list)=(is the same as)A3(Product name selected from list) it will then use the numberical value in B2 and subtract the numberical value chosen in Job!D2. That part I got fine with the formula =IF(Job!C2:C100=A3,B2-Job!D2,B2).

    However, the complicated part is that I then want the formula to also be able to do this for B-Job!D3:D100. But only if A3(the correct product name) is selected in that row.

    I also want this to work so that it could also work in this way too =IF(Job!C2:C100=A4,B3-Job!D2,B3).

    And so on. Sorry if this didnt make sense, I am a bit of a novice but the problem is that there are just so many variations that the spreadsheet needs to account for. I have tried using AND/OR in the formula I have tried =IF(Job!C2:C100=A3,B2-Job!, IF=IF(Job!C2:C100=A3,B2-Job!D3,B2)) just to try and get at least one product working with differed rows in Jobs!D.

    And just incase it helps for me to describe why im doing this and the outcome i want. It is basically that we are a carpet fitting firm, and I want our stock to reduce on the spreadsheet everytime stock is taken out for a fitting job. so the conditions are i want to be able to select a product from a drop down list, that relates to a different page on the spreadsheet, this then uses the quantity ive input to reduce the quantity of the stock.

    I tried to attached a screenshot of the spreadsheet im using to help you visualise the issue, but as its my first time posting i was unable to

    Thanks in advance for your answers, looking forward to your responses.
    Attached Images Attached Images

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: IF formula with multiple If_True_Values & Multiple Conditions HELP!

    Hi
    are you in need of an Excel solution or a Google sheets solution ( you posted in an Excel subforum your profile indicates GSheets)
    AFAIK the syntax =IF(Job!C2:C100=A3,... is not correct in Excel. Perhaps it is in GS?

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,718

    Re: IF formula with multiple If_True_Values & Multiple Conditions HELP!

    Welcome to the forum.

    Screenshots are not much use to us, as no-one wants to type in all your data in order to try a few things out. It is better to attach a sample Excel workbook. Details of how to do this are given in the yellow banner at the top of the screen.

    Pete

  4. #4
    Valued Forum Contributor
    Join Date
    07-13-2021
    Location
    California, USA
    MS-Off Ver
    2010
    Posts
    513

    Re: IF formula with multiple If_True_Values & Multiple Conditions HELP!

    I agree with Pete: you should attach an example Excel file that demonstrates the problem, so that we can see all data and formulas. And when you do, be sure to tell us which cells to look at in order to focus our attention on the problem.

    And I agree with Pepe: =IF(Job!C2:C100=A3,B2-Job!D2,B2) is not valid syntax. That is, it would produce a #VALUE error, if it is entered in row other than 2:100.

    Unfortunately, the formula might give you the illusion of "working" because it returns a value, not an error, when the formula is entered in rows 2:100 -- a consequence of the "implied intersection" feature. But it is important to understand that the value is probably not what you intended, except by accident.

    Be that as it may, I wonder if the following does what you intended.

    =IF(ISNUMBER(MATCH(A3, Job!$C$2:$C$100, 0)), B2-Job!D2, B2)

    -----

    Quote Originally Posted by ReyLex54 View Post
    However, the complicated part is that I then want the formula to also be able to do this for B-Job!D3:D100. But only if A3(the correct product name) is selected in that row.
    [....]
    Sorry if this didnt make sense
    [....]
    I have tried =IF(Job!C2:C100=A3,B2-Job!, IF=IF(Job!C2:C100=A3,B2-Job!D3,B2))
    Sorry, but your requirement is unclear, and your attempt to implement it does not make sense, even after we correct the typos, to wit: (a) the first "B2-Job!" should be B2-Job!D2; and (b) remove "IF=".

    The general form of an IF expression is IF(condition, value-if-true, value-if-false). It reads like: if "condition" is true, return value-if-true; otherwise, return value-if-false.

    That is, it's an "either-or" operation. In general, a formula cannot return two results -- unless you intend to combine them arithmetically (e.g. add them), or you concatenate them as text.

    But without a better description of __exactly__ how you want the result to appear, I cannot offer guidance without risking misdirection.

  5. #5
    Registered User
    Join Date
    10-13-2021
    Location
    Essex, England
    MS-Off Ver
    Google Sheets
    Posts
    2

    Re: IF formula with multiple If_True_Values & Multiple Conditions HELP!

    Quote Originally Posted by curiouscat408 View Post
    But without a better description of __exactly__ how you want the result to appear, I cannot offer guidance without risking misdirection.
    Okay so what i want the spreadsheet to do is everytime someone selects a product(doorbar) for a different client in the Jobs page, I want it to reduce the stock amount of the selected product in the doorbars page.

    So the sheet needs to be able to understand that if ive selected "Antique bronze tops fab tile edge 90cm" in Jobs!C2 and then put 1 into the quantity in the column next to it, it has to reduce the quantity level next to "Antique bronze tops fab tile edge 90cm" in Doorbars!C8.

    and this then needs to work in the same way again, and for all the different types of door bars on for the next row down in Jobs!C3 etc.

    So i can constantly add new clients to my jobs page, assign a product and quantity needed for that job, and then that automatically reduces the stock level for that product in the correct page.

    Im not sure how to make it any clearer than that im afraid.

    Let me know if that helps you understand my request better. as I say im a novice at excel so dont know if im going along the right lines with the IF formula, i simply went that route because when i said it outloud it was "if i select product X for a job I want to THEN reduce product X in the stock list"

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,544

    Re: IF formula with multiple If_True_Values & Multiple Conditions HELP!

    Without a sample it is hard to test and be sure, however I feel as if the following will work.
    For cells C2 and down on the DoorBars sheet: =B2-SUMIFS(Job!D$2:D$100,Job!C$2:C$100,A2)
    In this case the result should be -1.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. If formula on range with multiple conditions over multiple columns
    By Mr Stern 2 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-27-2021, 11:36 AM
  2. Multiple IF AND OR formula with multiple conditions
    By hawkdaddy404 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-21-2020, 10:02 AM
  3. Replies: 1
    Last Post: 07-20-2018, 11:14 PM
  4. 3 multiple conditions with multiple criteria formula help
    By rmnk101190 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-29-2013, 04:37 PM
  5. [SOLVED] Syntax for formula that uses multiple conditions inside of multiple IF statements
    By njmiller31 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-02-2013, 11:55 AM
  6. Sum of multiple values from multiple conditions across multiple sheets
    By ride_op in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 04-19-2011, 01:27 AM
  7. Multiple conditions in a formula
    By TV in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-12-2006, 03:35 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1