ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Results no longer currency when adding text to formula / formulas based on resulting cell don't work. (https://www.excelbanter.com/excel-programming/376211-results-no-longer-currency-when-adding-text-formula-formulas-based-resulting-cell-dont-work.html)

StargateFan[_3_]

Results no longer currency when adding text to formula / formulas based on resulting cell don't work.
 
A cell formatted for currency that has this formula:
=IF($A$2<"",($E$2) & " x 2 = " & CEILING(($E$2*2),0.25),"")

now gives the result of: 8.4 x 2 = 17
instead of: $8.40 x 2 = $17.00

And E4 which would then use the above result of $17.00 now gives me a
#value return.

Is there a way to use the text and formula while still retaining
currency formatting and yet XL2K still can work with results?

TIA. I got the text and formula approach above from the archives.


Andrew Taylor

Results no longer currency when adding text to formula / formulas based on resulting cell don't work.
 
The cell formatting will only take effect if the result of
the calculation is a number, so you need to format
each part of your equation:

=IF($A$2<"",TEXT($E$2,"$0.00") & " x 2 = " &
TEXT(CEILING(($E$2*2),0.25),"$0.00"),"")

You can't get E4 to "use the result" of this in a calculation, because
it's text. I would just use CEILING(($E$2*2),0.25) instead in the
formula in E4 instead.



StargateFan wrote:
A cell formatted for currency that has this formula:
=IF($A$2<"",($E$2) & " x 2 = " & CEILING(($E$2*2),0.25),"")

now gives the result of: 8.4 x 2 = 17
instead of: $8.40 x 2 = $17.00

And E4 which would then use the above result of $17.00 now gives me a
#value return.

Is there a way to use the text and formula while still retaining
currency formatting and yet XL2K still can work with results?

TIA. I got the text and formula approach above from the archives.




All times are GMT +1. The time now is 01:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com