looking in numerous cells but only posting 1 value (if that makes sense) (1st time user)

medek

New Member
Joined
Jun 17, 2015
Messages
5
hi 1st time user here

i have spreadsheet for all the products i purchase. i buy in 3 different currencies $, Euro & £. i have 3 separate columns (f, g & H) for the 3 different currencies and only 1 of them is supposed to be populated with the relevant cost price e.g. cell F5 will say $2.50 or cell G5 Euro5.00 etc.

at the top of each of these columns i have the exchange rate for each of the currencies (f2, g2 & h2)

In column "I" i need it to say the exchange rate for that product however i need a formula to select the correct exchange rate based on which field in the buying price columns is populated. would also be helpful if an error message would generate if 2 buying fields were populated.

hope i've been clear enough and hoping someone can help me.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

tony0682

Board Regular
Joined
May 19, 2005
Messages
164
Think this would just need a simple nested-if formula.

=IF(OR(AND(F5>0,G5>0),AND(F5>0,H5>0),AND(G5>0,H5>0))=TRUE,"Two amounts were entered",IF(F5>0,$F$2,IF(G5>0,$G$2,IF(H5>0,$H$2,"No Amount Entered"))))
 
Upvote 0

Aaron Blood

Active Member
Joined
Oct 10, 2002
Messages
485
I would do it like this:
=IF(COUNT(F5:H5)>1, "oops!", SUMPRODUCT(--(F5:H5<>0),F$2:H$2))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,195,617
Messages
6,010,728
Members
441,565
Latest member
menangterus556

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top