Forum Discussion

cynde1957's avatar
cynde1957
Copper Contributor
Apr 14, 2022

Re: number 99 fails in my formula, here is the formula I need to where it works with "F" but not "99"?

chrisgrahamdack

Hi Chris, thanks for answering me.

 

I want to be able to not refer to F anymore, (it use to mean foreign cost in my accounting ledger).

My accounting ledger will not have F anymore, it will only have the code  99 to mean foreign cost.

So I just wanted to replace in my new spreadsheet formula to look for:  IF the code is "99" in cell E17, then it will go take the amount in cell C17 and place that amount into yet another cell.

4 Replies

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    cynde1957 I suspect that the code 99 is entered as a number. check it by entering

     

    =ISTEXT(E14) somewhere.

     

    TRUE will tell you that it is a text, and you should indeed use "99" in the formula (i.e. with quote marks surrounding the digits 99).

     

    FALSE means that it is not a text, but a number. Change the formula to 

     

    IF(E14=99, C14, 0)

     

    By the way, no need to wrap it all in a SUM function. 

    • cynde1957's avatar
      cynde1957
      Copper Contributor
      Thank you Riny, I will try that. It was someone else's template I am changing so unfortunately there are lot of cells I am not sure of the format and why they added certain formula functions. I am learning from this feedback so thank you again!
      Cynde
      • chrisgrahamdack's avatar
        chrisgrahamdack
        Copper Contributor
        Agreed with Riny. Depends if you want a value (if false) or the cell left blank, if the latter then =IF(E17=99,C17,"")