View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
ERR229
 
Posts: n/a
Default problem with decimal in calculation

Hi again,

I misread your desired format, try this instead of what I gave you in the
previous reply:

#,##0"A";#,###"B"

Sorry for the confusion!

--
ERR229


"Amanda" wrote:

when using the below formula, the answer will not follow the decimal format I
have assigned under format. If I leave off the &"A" and the &"B" then it
works fine by using the decimal format I selected, however with the &"A" it
gives me a decimal answer 0.0000000000

=IF(((E8-G8)/ABS(G8)*100)=0,((E8-G8)/ABS(G8)*100)&"A",ABS((E8-G8)/ABS(G8)*100)&"B")

What I need is if it is a positive result, then the cell will hold the
result with an A behind it and if it is negative, then the result with a
B....but I only want 1 number(no decimals), i.e. (10-5)/ABS(5) * 100 equals
200 which tells me it is a 200% increase over last year....in the cell I want
the answer to read 200A (without the % sign which is why I multiplied by 100).

Thanks in advance for your assistance!
Amanda