IF Statements

HandyAndy

New Member
Joined
Oct 2, 2013
Messages
13
Hi Everyone
I have a question about IF statements.
On Sheet 1, l have a cell called E5 which has a drop down menu with the following selections:
- Option 1
- Option 2
- Option 3

Depending upon which option is selected, it will pull a cell value from 3 different sheets, lets call that value cell A1.
So if Option 1 is selected, in another cell l need to pull cell A1 from 'Option 1 Sheet'
If Option 2 is selected, it pulls cell A1 from 'Option 2 Sheet'
And if Option 3 is selected, it pulls cell A1 from 'Option 3 sheet'.

=IF('Sheet1'!$E$5="Option 1",'Option 1 Sheet'!A1, IF ('Sheet1'!$E$5="Option 2",'Option 2 Sheet'!A1, 'Sheet1'!$E$5="Option 3",'Option 3 Sheet'!A1
and l get stuck.
Would appreciate help of the group please.
Thanks in advance!!!
HandyAndy
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
What are you doing with the A1 cell value once you 'pull' it?
 
Upvote 0
In its simplest form, i have a summary sheet that shows the value of A1 for Option 1, or Option 2, Option 3. I am just referencing the value.
 
Upvote 0
Ohhhh, you want a cell formula, not a macro, I missed that part when I first read the question :(

VBA Code:
=IF(Sheet1!E5="Option 1",'Option 1 Sheet'!A1,IF(Sheet1!E5="Option 2",'Option 2 Sheet'!A1,IF(Sheet1!E5="Option 3",'Option 3 Sheet'!A1,"")))
 
Last edited:
Upvote 0
Or a slight mod which will automatically use the value from 'Option 3 Sheet' if 'Option 1' or 'Option 2' is not found...

VBA Code:
=IF(Sheet1!E5="Option 1",'Option 1 Sheet'!A1,IF(Sheet1!E5="Option 2",'Option 2 Sheet'!A1,'Option 3 Sheet'!A1))
 
Last edited:
Upvote 0
Solution
Thank you @HandyAndy

You could switch the order in the formula if you would prefer one of the other Option sheets to be the default value displayed. ;)
 
Upvote 0

Forum statistics

Threads
1,214,588
Messages
6,120,409
Members
448,959
Latest member
camelliaCase

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
Back
Top