Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
A difficult problem
 
Posts: n/a
Default How to refer to a cell format code?

Hi!
I have a huge amount of different money values in diffenet cells, and I need
to separate/sort them according to the currency. The problem is that the
currency has been defined from the cell format menu(Format cell -custom and
# ##0,00\ "AUD"). If I use the FIND or SEARCH tools, they won't find the text
AUD because it is not typed in to the cell in a "regular" way. So I'm asking
if someone knows how to make a reference to the "AUD" part of the cell format
code, so that I could sort those currencies. If someone knows some way to do
this sorting, I would appreciate, if someone could help me.
  #2   Report Post  
Niek Otten
 
Posts: n/a
Default

Use this small User Defined Function (UDF)

Function CurrencyFormat(a As Range) As String
CurrencyFormat = a.NumberFormat
End Function

Open the VB Editor, ALT+F11
InsertMOdule
paste the function text into the module

You can now use the function in your worksheet to create an extra column and
use that for sorting--

Kind Regards,

Niek Otten

Microsoft MVP - Excel



"A difficult problem" <A difficult wrote
in message ...
Hi!
I have a huge amount of different money values in diffenet cells, and I
need
to separate/sort them according to the currency. The problem is that the
currency has been defined from the cell format menu(Format cell -custom
and
# ##0,00\ "AUD"). If I use the FIND or SEARCH tools, they won't find the
text
AUD because it is not typed in to the cell in a "regular" way. So I'm
asking
if someone knows how to make a reference to the "AUD" part of the cell
format
code, so that I could sort those currencies. If someone knows some way to
do
this sorting, I would appreciate, if someone could help me.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
can't format cell - have tried unlocking and unprotecting griffin Excel Discussion (Misc queries) 1 April 5th 05 02:11 AM
Format a cell with numbers and user defined text Rod R. Excel Discussion (Misc queries) 0 March 30th 05 04:31 PM
Custom format that shows blank cell if another cell is empty Zdenek Moravec Excel Discussion (Misc queries) 1 March 25th 05 11:45 AM
Make Change Case in Excel a format rather than formula Kevin Excel Worksheet Functions 1 March 18th 05 08:53 PM
Format spreadsheet so no input allowed if certain cell is =<0 Jan Buckley Excel Worksheet Functions 9 January 26th 05 12:21 AM


All times are GMT +1. The time now is 09:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"