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 fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
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,223,237
Messages
6,170,924
Members
452,366
Latest member
TePunaBloke

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