Forum Discussion
number 99 fails in my formula, here is the formula I need to where it works with "F" but not "99"?
This is a formula I am using currently but I need to change the code "F" to what we are using in our accounting ledger "99". I thought I could simply change the "F" into new code "99" but it doesn't work.
Curent formula is:
=SUM(IF(E14="F", C14, 0))
new formula would be:
=SUM(IF(E14="99", C14, 0)). won't work. Is there something about using 99 that can't work?
7 Replies
- chrisgrahamdackCopper ContributorHi, I tried this formula which changed an F instance into 99 in the appropriate cell which worked but are you after something different? =IF(A6="F","99","")
- cynde1957Copper Contributor
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.
- Riny_van_EekelenPlatinum 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.
- chrisgrahamdackCopper ContributorYou may wish to consider using a SUBSTITUTE formula to make content changes... =SUBSTITUTE(A6,"F","99")