custom format - extract text value for conditional processing

margalo

New Member
Joined
Oct 16, 2012
Messages
1
Hi - is there anyway to interrogate the value of text in a cell that is custom formatted? I have a spreadsheet where cells in a column are formatted as:
#,##0.00" USD";-#,##0.00" USD";#,##0.00;@
#,##0.00" PHP";-#,##0.00" PHP";#,##0.00;@
#,##0.00" MXN";-#,##0.00" MXN";#,##0.00;@

ETC.

I would like to do certain processing based on currency - but I only see the numeric value when I look at the cell. When i filter, I see the each numeric value with the currency - but how do extract the currency literal???
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi
Welcome to the board

You can also use a named formula to get the format.

For ex., to get the number format of the cell immediately on the left, define the name:

Name: GetFormat
Refers to: =GET.CELL(7,INDIRECT("RC[-1]",FALSE))

Now in B1:

=GetFormat

gives you the format in A1.

Remark: this formula will only update when some calculation is performed in the worksheet.
 
Upvote 0
Hi - is there anyway to interrogate the value of text in a cell that is custom formatted? I have a spreadsheet where cells in a column are formatted as:
#,##0.00" USD";-#,##0.00" USD";#,##0.00;@
#,##0.00" PHP";-#,##0.00" PHP";#,##0.00;@
#,##0.00" MXN";-#,##0.00" MXN";#,##0.00;@

ETC.
Let me understand your setup... you have a single column where the number formats as shown above are intermingled with each other down the column? Wow, that must have been a real pain entering your date if you had to custom format each cell individually! Have I understood your setup correctly? If so, did you use VB to perform these custom formats and, if so, would a VB solution be acceptable?
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,598
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top