If then

PlzHelpMe

New Member
Joined
Sep 16, 2013
Messages
9
Hello everyone, hoping one of you smart people can help with my conundrum. I'm using the formula below as an "if then," but getting an error (Invalid Name) every time. Basically I want to return one index/match if cell A2 is "Late" or another index/match if A2 is "Early." Please help me...

=IF(A2=Early, (INDEX(Data!$B$2:$K$21, MATCH("Average",Data!$C$2:$C$21,), MATCH("Cure Per Connect",Data!$B$2:$K$2,))), IF(A2=Late, (INDEX(Data!$B$2:$K$21, MATCH("Late",Data!$C$2:$C$21,), MATCH("Cure Per Connect",Data!$B$2:$K$2,0)))))
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Unless those are named ranges or named constants, they need to be in quotes:

Code:
=IF(A2="Early", INDEX(Data!$B$2:$K$21, MATCH("Average", Data!$C$2:$C$21, 0), MATCH("Cure Per Connect", Data!$B$2:$K$2, 0)),
 IF(A2="Late",  INDEX(Data!$B$2:$K$21, MATCH("Late",    Data!$C$2:$C$21, 0), MATCH("Cure Per Connect", Data!$B$2:$K$2, 0))))
 
Upvote 0

Forum statistics

Threads
1,203,553
Messages
6,056,063
Members
444,841
Latest member
SF_Marnie

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