IF and INDEX formula

bemp87

Board Regular
Joined
Dec 10, 2016
Messages
102
Hi Community, I'm needing some help with a IF and INDEX formula, and here is what I have so far:

1) I have a data validation List ranging from A1:A25 (working sheet)
2) I have a data sheet that includes a list of names with their work schedules
a) on the data sheet cell A1 will be a name, B1 will be a start time, and C1 will be a end time
3) I am trying to create a IF formula on my working sheet that will basically look for a specific value in cell A1 and return the corresponding value into cell B1... i am using this formula =IF(A1=Datasheet!A2:A25,INDEX((Datasheet!!B2:Z25),1,0,1))
4) Essentially what i would like to happen is that IF any value in cell A1 on my working sheet = a corresponding value from the data sheet that it will return in cell B1 and C1 the start and end time of that corresponding person.

After using the formula I am getting a FALSE message, am i doing something wrong. I know this can be doing by writing a separate IF statement for every name, but was hoping there was a better or easier way to do this.

Any help would be much appreciated...
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
B1 formula:

Code:
=IFERROR(INDEX(Datasheet!B$2:B$25,MATCH($A1,Datasheet!$A$2:$A$25,0)),"?")

You should then be able to copy the formula to C1.

WBD
 
Upvote 0
Hi WBD - Thanks for the help, when putting the code you provided in cell B1 all that returns is a ?....Not sure what i am missing or did wrong in putting in the formula, any guidance?
 
Upvote 0
That means that it didn't find a match for the value in A1 - is that definitely in the list?

WBD
 
Upvote 0
It was my mistake, it is working as intended, I had an error on my part but it has been corrected and the formula works perfectly. Thanks so much for the help this makes my life a million times easier!!!!
 
Upvote 0

Forum statistics

Threads
1,214,848
Messages
6,121,914
Members
449,054
Latest member
luca142

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