Thomas Popp

Q: Problem with Formula - multiple outcome IF then statement

Hi everyone,

 

I need help doing the following:

I have a dropdown list in B2 of a spreadsheet. It has variables like "Microphones", "Mixers", "Recorders",etc.

 

I need an IF/THEN statement that will allow another cell (D2) to display a different cells contents. For Example:

 

IF B2 = Microphones, then display CELL Contents A1from PRODUCTS spreadsheet.

IF B2 = MIXERS, then display CELL Contents A2 from PRODUCTS spreadsheet

IF B2 = RECORDERS, then display CELL Contents A3 from PRODUCTS spreadsheet

 

 

heres the final catch - each of those variable (A1, A2, A3) are each dropdown lists as well

 

Any advice?

 

Thanks!

iBooks Author, OS X Mountain Lion

Posted on Aug 13, 2014 1:55 PM

Close

Q: Problem with Formula - multiple outcome IF then statement

  • All replies
  • Helpful answers

  • by Wayne Contello,

    Wayne Contello Wayne Contello Aug 13, 2014 2:28 PM in response to Thomas Popp
    Level 6 (19,037 points)
    iWork
    Aug 13, 2014 2:28 PM in response to Thomas Popp

    Thomas,

    With regard to:

    IF B2 = Microphones, then display CELL Contents A1from PRODUCTS spreadsheet.

    IF B2 = MIXERS, then display CELL Contents A2 from PRODUCTS spreadsheet

    IF B2 = RECORDERS, then display CELL Contents A3 from PRODUCTS spreadsheet

     

     

     

     

    Can you clarify what you mean by the words "PRODUCT spreadsheet"?

     

    A) do you mean a table in the same sheet of the same document?

    B) do you mean a table in a different sheet of the same document?

    C) do you mean a table in a different document?

     

    If you mean C then there is a problem addressed only by consolidating the information into the same document.  If A or B then all is good

     

    Assuming A or B:

    Screen Shot 2014-08-13 at 4.27.17 PM.png

     

    A1=IF(B2="Microphones", PRODUCTS::A1, IF(B2="Recorders",PRODUCTS::A2,IF(B2="Mixers",PRODUCTS::A3,"")))

     

    this is shorthand for .... select cell A1 in the the top table, then type (or copy and paste from here) the formula:

    =IF(B2="Microphones", PRODUCTS::A1, IF(B2="Recorders",PRODUCTS::A2,IF(B2="Mixers",PRODUCTS::A3,"")))

  • by Thomas Popp,

    Thomas Popp Thomas Popp Aug 13, 2014 3:17 PM in response to Wayne Contello
    Level 1 (0 points)
    Aug 13, 2014 3:17 PM in response to Wayne Contello

    Ok here is what I am trying to do. I have a Numbers Spreadsheet that looks like this. It has 3 sheets -

     

    Checklist, Products, Checklist Links

    Screenshot 2014-08-13 15.00.44.png

    Screenshot 2014-08-13 15.12.27.png

     

    On Sheet 2 (PRODUCTS) there is a spreadsheet with products for each category.

    Screenshot 2014-08-13 15.01.18.png

    Screenshot 2014-08-13 14.56.45.png

     

    What I want to do is when I change any row in the B Category, it will make the list that is appropriate for that category show up in the D Column

     

    IF B2 is Microphones, Then D2 is PRODUCTS::B1, If B2 is Mixers, Then D2 is PRODUCTS B2

     

    Hopefully this helps. Thanks!

  • by t quinn,

    t quinn t quinn Aug 13, 2014 6:59 PM in response to Thomas Popp
    Level 5 (5,012 points)
    Mac OS X
    Aug 13, 2014 6:59 PM in response to Thomas Popp

    Hi Thomas,

     

    It seems you are asking a variation on the conditional popup question.

    I have been playing with this idea of conditional pop-ups. This is a variation of an answer I gave here:

    Re: changing Pop-up-Menu

    It is much simpler (Yea!).

     

    This would all happen in your checklist table. Each of your current rows there would have 3 additional rows under it that would be hidden or revealed using filters. For instance Select Recorders category and Choose Recorder popup is revealed.

    Screen Shot 2014-08-13 at 7.16.48 PM.png

     

    B2= IF(A1="Microphones","show","")

    B3= IF(A1="Mixers","show","")

    B4= IF(A1="Recorders","show","")

     

    Screen Shot 2014-08-13 at 7.56.11 PM.png

    Column B can be hidden.  The choice made in A1 determines which of A2, A3 or A4 can be seen.

    Does this seem useful?

     

    quinn

  • by t quinn,

    t quinn t quinn Aug 13, 2014 7:58 PM in response to Thomas Popp
    Level 5 (5,012 points)
    Mac OS X
    Aug 13, 2014 7:58 PM in response to Thomas Popp

    Hi again Thomas,

     

    I didn't reply to the second part of your question, which is the self updating popup request. Numbers 3 does not have dynamic updating of popups. we have to do it manually. I would have a table with a column for each of your product popups.

    Screen Shot 2014-08-13 at 8.33.40 PM.png

    Once I choose Pop-Up Menu all 4 entries are popups. To add a new product I type it in and format it with the originals.

    Screen Shot 2014-08-13 at 8.52.12 PM.png

     

    The trickiness will ensue when you want to add the new popup to your checklist table. It is not even that tricky.

    You have to trash your filter on column B temporarily and filter column A for your soon to be altered popup. Say the new popup is for a recorder. Your filter on A will be:

    Screen Shot 2014-08-13 at 8.46.14 PM.png

    This will only find rows where a recorder has not already been chosen. Select Column A and paste your new popup in.

    Then delete your filter on column A and redo the "show" filter on column B.

     

    When inspired, go to Numbers feedback and request Dynamic Pop-Ups!

     

    Hope this isn't too much

     

    quinn

  • by Yellowbox,

    Yellowbox Yellowbox Aug 14, 2014 3:48 AM in response to Thomas Popp
    Level 6 (10,455 points)
    Mac OS X
    Aug 14, 2014 3:48 AM in response to Thomas Popp

    Hi Thomas,

     

    Following on from quinn's reply. Here is a way to make updates semi-automatic. Here is the table before applying quinn's idea for a filter on "show".

     

    Screen Shot 2014-08-14 at 8.26.20 pm.png

     

    Choose a category. Formula in C2 (and Fill Down)

    =IF(B$1=A2,"Show","")

    This formula will cope with new categories.

     

    Screen Shot 2014-08-14 at 8.33.37 pm.png

     

    Now apply the Filter. Note that when B1 is 'Choose a category' none of C contain show, so all Body Rows are hidden.

     

    Now for the update trick. The formula in C does not need revising.

    Add another category (complete with the sub-category Pop-Up)

     

    Screen Shot 2014-08-14 at 8.37.55 pm.png

     

    and edit the 'Choose a category' Pop-Up in B1 to include Geegaws. Formula in C5 will insert Show when Geegaws are chosen.

     

    Because Row 1 is a Header Row, the filter does not affect it.

     

    Screen Shot 2014-08-14 at 8.44.14 pm.png

     

    We are getting there, quinn!

    Regards,

    Ian.