Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel VBA code to format a column to currency

Status
Not open for further replies.

Almarton

Programmer
Jan 1, 2002
42
0
0
BR
Hi Folks,

I wonder if somebody could help me with a question on Excel VBA. How can I format a range of cells or a column to display its value as currency on run time?

My current code imports a .txt file to an Excell worksheet and one of the columns display its values as: 00005477 I would like it to be automatically formated to: 54,77
(currency format).

Can you help me forwarding the bit of sourcecode that does it?

Thanks in advance, regards
Alexandre Marton


Alexandre @lmarton Marton
almarton@task.com.br
 
Hi,

Well, what I would do to answer your question, since I don't know the currency code format off the top of my head, is to

turn on the macro recorder
change the format to currency
turn off the macro recorder
check the VB code

:)

Skip,
Skip@TheOfficeExperts.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top