Calgarypuck Forums - The Unofficial Calgary Flames Fan Community

Go Back   Calgarypuck Forums - The Unofficial Calgary Flames Fan Community > Main Forums > The Off Topic Forum > Tech Talk
Register Forum Rules FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 11-14-2014, 10:03 AM   #1
iggyntangs
Scoring Winger
 
iggyntangs's Avatar
 
Join Date: Oct 2010
Exp:
Question Excel VBA Question - Changing Format Cell To Particular Currency

Hi all,

I've been trying to do IF statements and case statements to achieve this and nothing has been remotely successful.

Basically I have a 5 tab workbook that has different named ranges within each sheet that are meant to be a currency format.

However based on the value of a cell in the 1st tab (e.g. it could be CAD, USD, NOK, etc.) the currency format on those range of cells should change.

I.e. If the cell value in tab 1 is equal to CAD then all the named ranges in tabs 2-5 should be "$", if USD still "$", if NOK "kr " etc.

Any help would be greatly appreciated!
iggyntangs is offline   Reply With Quote
Old 11-14-2014, 10:38 AM   #2
Old Yeller
First Line Centre
 
Join Date: Mar 2004
Exp:
Default

I haven't given this much thought, but could you not just have a hidden sheet with a lookup table with the currency in column A and the corresponding currency symbol in column B and then do a vlookup based on that?
Old Yeller is offline   Reply With Quote
Old 11-17-2014, 11:39 AM   #3
nfotiu
Franchise Player
 
Join Date: May 2002
Location: Virginia
Exp:
Default

Conditional formatting will do exactly what you want.

The format formula would look something like =(B1="NOK") and then you can click on the Format button and choose the currency format you want.
nfotiu is offline   Reply With Quote
Old 11-19-2014, 09:18 AM   #4
Flames89
First Line Centre
 
Flames89's Avatar
 
Join Date: Aug 2003
Location: Toronto, ON
Exp:
Default

Yep, you can do the above Conditional by making your own rule on the cell, and selecting a formula to fill. Do a new rule for each currency.


Or just do a nested IF with the TEXT(reference, format) formula.
Like,
=IF(C3="CAD", TEXT(B3, "$0,000.00"), IF(C3="EUR", TEXT(B3, "€ 0,000.00", etc....
You will need to have to prepare the funky symbol currency text formats before typing the full formula so you can just copy/paste in the "€ 0,000.00", for example

Last edited by Flames89; 11-19-2014 at 09:21 AM.
Flames89 is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 02:46 AM.

Calgary Flames
2024-25




Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright Calgarypuck 2021 | See Our Privacy Policy