CK Guelph

Q: If then statement with pre-filled text cell return

I am trying to make a statement that will return a cell with text in it.

 

Column A (a type of food) e.g., ACORN SQUASH

column B describes if food is 'good' or 'bad' (for  a particular diet)

Column c - if then statement. My attempted formula that didn't work: If (B1=good,A1,"") 

 

If column C says 'good' i want it to fill the cell with the food that is in column A . I'm just trying to separate out the good and bad foods with a formula because it's a huge list.

Hope this is clear!

 

Thanks for your help!

Posted on Oct 2, 2016 6:22 PM

Close

Q: If then statement with pre-filled text cell return

  • All replies
  • Helpful answers

  • by Wayne Contello,

    Wayne Contello Wayne Contello Oct 2, 2016 6:41 PM in response to CK Guelph
    Level 6 (19,357 points)
    iWork
    Oct 2, 2016 6:41 PM in response to CK Guelph

    please select a portion of the table in question and post it to this forum so we can test with some of your data

     

     

    A shot in the dark just in case...

     

    =if(B1="good", A1, "")

     

     

    this assumes you have the word "good" in cell A1

     

    you can fill this down by selecting the cell with the formula, copy

    now select the column, paste

  • by Barry,

    Barry Barry Oct 3, 2016 4:09 PM in response to CK Guelph
    Level 7 (32,582 points)
    iWork
    Oct 3, 2016 4:09 PM in response to CK Guelph

    Hi CK,

     

    Your formula looks good, but it needs double quotes around 'good' to identify that as a text string.

     

    C1: =IF(B1="good",A1,"")

     

    Copy everything following the = sign.

    In Numbers, click on cell C1, type = then paste

    Click the green checkmark to confirm the entry.

    C1 should now display the contents of A1, or appear empty, depending on the content of B1.

     

    Next step:

     

    Select the cell C1 (single click), Copy.

    Select all of column C, Paste

     

    This fills the same formula (with the row adjusted to match the cell containing the formula) into all cells in column C.

     

    Regards,

    Barry

  • by CK Guelph,

    CK Guelph CK Guelph Oct 3, 2016 7:29 PM in response to Barry
    Level 1 (4 points)
    iWork
    Oct 3, 2016 7:29 PM in response to Barry

    Thanks Barry, that was the formula I had in there, it didn't work. Still would like to figure out how to do this if it does come up again!

     

    I ended up just SORTED the data which re-organized the info which is what i was trying to do . this made it easier to copy and paste the info into the sections and format I needed it .

     

    thanks anyway,

    cheryl

  • by Barry,

    Barry Barry Oct 4, 2016 12:18 AM in response to CK Guelph
    Level 7 (32,582 points)
    iWork
    Oct 4, 2016 12:18 AM in response to CK Guelph

    Hi Cheryl,

     

    Sorting (or filtering to show only rows with 'good' in column B) are also good methods to view only the data significant to your purpose.

     

    Regarding 'figuring out how to do this (with a formula), take another close look at my previous post. It points out the only thing missing from your version. You were so close, that a close reading and trying it out should get you the rest of the way!

     

    Regards,

    Barry

  • by Wayne Contello,

    Wayne Contello Wayne Contello Oct 4, 2016 5:16 AM in response to CK Guelph
    Level 6 (19,357 points)
    iWork
    Oct 4, 2016 5:16 AM in response to CK Guelph

    I am curious why my post seems to have been ignored.  It provides the direct answer to your question

  • by CK Guelph,

    CK Guelph CK Guelph Oct 4, 2016 8:11 AM in response to Wayne Contello
    Level 1 (4 points)
    iWork
    Oct 4, 2016 8:11 AM in response to Wayne Contello

    My apologies Wayne, I didn't mean to ignore your post - same response to what I wrote to Barry, thanks or the tip, i haven't tried the formula yet as I ended up reorganizing the data through sorting.

     

    Thanks for the quick response!

    -Cheryl

  • by CK Guelph,

    CK Guelph CK Guelph Oct 4, 2016 8:15 AM in response to CK Guelph
    Level 1 (4 points)
    iWork
    Oct 4, 2016 8:15 AM in response to CK Guelph

    Your formula worked...i swear i did that in the several times i tried..apparently not! thanks!