Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
jim jim is offline
external usenet poster
 
Posts: 11
Default Currency Marker in Conditional

I know this may be stretch, but does anyone know of a way to display
different cell formatting in a conditional? I have a spreadsheet that
reports values in the currency of the local country. Only one country
is shown at a time, so sometimes the values are in Euros and other
times in US Dollars. Is it possible to change the cell formatting to
display the appropriate currency format based on a selection in a
different cell?

Example: If(A1="UK",*use pound symbol*,*otherwise use US dollar sign*)

Thanks for any insight.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 94
Default Currency Marker in Conditional

Hi Jim,

you could use a macro:-

Imagine your marker is in column A and your value in column B.
press Alt+F11
right click in the upper left pane and choose Insert Module
paste this code
:=====================================

Sub FormatCurrency()

[A1].Select

Do Until IsEmpty(ActiveCell)

If ActiveCell.Value = "UK" Then _
ActiveCell.Offset(0, 1).NumberFormat = "[$£-809]#,##0.00"
If ActiveCell.Value = "US" Then _
ActiveCell.Offset(0, 1).NumberFormat = "$#,##0.00"

ActiveCell.Offset(1, 0).Select

Loop

End Sub

:========================================

http://www.excel-ant.co.uk

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
conditional formatting for currency TC Excel Worksheet Functions 1 May 20th 06 02:55 PM
Conditional Format Not Working KMH Excel Discussion (Misc queries) 0 December 22nd 05 06:32 PM
Conditional formula - language needed gamebird Excel Worksheet Functions 7 October 11th 05 12:48 AM
is there a way to use the currency format in a conditional sum? Devlin Excel Discussion (Misc queries) 1 August 16th 05 03:54 PM
Currency Style button Anita Excel Discussion (Misc queries) 3 April 18th 05 01:48 AM


All times are GMT +1. The time now is 04:23 AM.

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

About Us

"It's about Microsoft Excel"