Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 81
Default If statement based on currency format

I have a spreadsheet that has a column (column B) of numbers. Some of the
numbers are formatted in Euro currency and some are formatted in USD currency.
I would like to put a formula in column C to automatically calculate the
currency conversion of the Euro to USD.

If cell B1 currency = Euro, then cell C1*1.45, else cell B1
Is there any way to do this?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 695
Default If statement based on currency format

first put this in a cell:

=CELL("format",B2) where B2 exchange to a cell where Euro is formattet
the result from this u can use in :

put in C2 and copy down:
=IF(CELL("format",B2)=" put result from above in here ",B2*1.45,B2)

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 296
Default If statement based on currency format

On Mon, 18 Sep 2006 11:35:02 -0700, juliejg1
wrote:

I have a spreadsheet that has a column (column B) of numbers. Some of the
numbers are formatted in Euro currency and some are formatted in USD currency.
I would like to put a formula in column C to automatically calculate the
currency conversion of the Euro to USD.

If cell B1 currency = Euro, then cell C1*1.45, else cell B1
Is there any way to do this?



How will any formula know whether the number is in euros of dollars,
unless you have a third column which defines the currency of col B
amounts?

Rgds
__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default If statement based on currency format

Hello.

I dont' think there is any built-in function to do this, but this one
might just work:
Public Function CheckEuro(rng As Range) As Boolean
Application.Volatile
CheckEuro = False
If rng.NumberFormatLocal = "[$€-2] # ##0,00" Then ' You need to
'excatly check what format you are using
CheckEuro = True
End If
End Function

Press Alt+F11 and choose insert Procedure and choose funcion.
It returns true if then number format in the cell you are testing is
excatly: "[$€-2] # ##0,00"

Then you could use the following if-formula
IF(checkEuro(B1)=TRUE;B1*1,5;A1)

You must make sure that the number format you are using for Euro is
excatly as shwon in the formula. If you are using different formats
you might manage to do something with a clever use of the left
function in vba.

Best regards
Per Erik



On Mon, 18 Sep 2006 11:35:02 -0700, juliejg1
wrote:

I have a spreadsheet that has a column (column B) of numbers. Some of the
numbers are formatted in Euro currency and some are formatted in USD currency.
I would like to put a formula in column C to automatically calculate the
currency conversion of the Euro to USD.

If cell B1 currency = Euro, then cell C1*1.45, else cell B1
Is there any way to do this?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 81
Default If statement based on currency format

Thank you all for your help! Very useful, I got what I needed

"juliejg1" wrote:

I have a spreadsheet that has a column (column B) of numbers. Some of the
numbers are formatted in Euro currency and some are formatted in USD currency.
I would like to put a formula in column C to automatically calculate the
currency conversion of the Euro to USD.

If cell B1 currency = Euro, then cell C1*1.45, else cell B1
Is there any way to do this?

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
Currency format in sort Ricki Miles Excel Discussion (Misc queries) 1 November 28th 05 06:31 PM
Put an if statement according to cell format Melkett Excel Worksheet Functions 1 August 31st 05 06:07 PM
New column based on row cell format peteracain Excel Discussion (Misc queries) 1 August 8th 05 01:37 PM
format cell based on results of vlookup function Edith F Excel Worksheet Functions 1 July 21st 05 07:39 PM
convert a numerical currency into word format Rojo Excel Worksheet Functions 1 February 24th 05 11:31 PM


All times are GMT +1. The time now is 09:51 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"