ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Currency Format (https://www.excelbanter.com/excel-discussion-misc-queries/163944-currency-format.html)

Denise

Currency Format
 
We have a formula that extracts numbers from a text field. Thse are currency
amounts. Is there a formula that can put his into a number format?

'=IF(LEFT($E2,3)="CAD",RIGHT($E2,LEN($E2)-3),0)

Thank you!




Dave Peterson

Currency Format
 
Right will return text.

You can coerce that text to a real number:
=IF(LEFT($E2,3)="CAD",--RIGHT($E2,LEN($E2)-3),0)

(the first - changes it to a negative number (but a number!). The second -
changes it back to positive.

Then you could give it the numberformat you like.

Or you could still return text, but make it look pretty:
=IF(LEFT($E2,3)="CAD",Text(RIGHT($E2,LEN($E2)-3),"000.000"),0)


Denise wrote:

We have a formula that extracts numbers from a text field. Thse are currency
amounts. Is there a formula that can put his into a number format?

'=IF(LEFT($E2,3)="CAD",RIGHT($E2,LEN($E2)-3),0)

Thank you!


--

Dave Peterson


All times are GMT +1. The time now is 02:28 AM.

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