Nested If Function - best option

Destiny85

New Member
Joined
Nov 26, 2014
Messages
2
Hi All,

I am trying to write an if function for the below.

[TABLE="width: 431"]
<TBODY>[TR]
[TD]Option 1</SPAN>[/TD]
[TD]Option 2</SPAN>[/TD]
[TD]Option 3</SPAN>[/TD]
[TD]Option 4</SPAN>[/TD]
[TD]Option Cost</SPAN>[/TD]
[/TR]
[TR]
[TD]Y</SPAN>[/TD]
[TD]N</SPAN>[/TD]
[TD]N</SPAN>[/TD]
[TD]N</SPAN>[/TD]
[TD] =IF(A2="Y",'Costs '!D24,"")</SPAN>[/TD]
[/TR]
[TR]
[TD]N</SPAN>[/TD]
[TD]N</SPAN>[/TD]
[TD]Y</SPAN>[/TD]
[TD]N</SPAN>[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]N</SPAN>[/TD]
[TD]N</SPAN>[/TD]
[TD]N</SPAN>[/TD]
[TD]N</SPAN>[/TD]
[TD] [/TD]
[/TR]
</TBODY><COLGROUP><COL span=4><COL></COLGROUP>[/TABLE]



Currently I can get it to work for one option using =IF(AP3="Y",'Costs '!D24,"") but I want to carry this formula across the next 3 columns.


I am guessing I need an OR function or something inbetweeen but am stuck.

There will only be one Y on each line so I want to be able to write a formula that will pick up the Y and give me the cost from a separate table. Not sure if a VLookup can be used this way so i went with the IF function.

Any help will be appreciated.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
How about:
=IF(COUNTIF(A2:D2,"Y")=1,'Costs'!D24,"")

EDIT: After reading your post again I don't think this is what you want. Can you post the desired result(s) if the Y is under each of the other three options?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,222,905
Messages
6,168,949
Members
452,227
Latest member
sam1121

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