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

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
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
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,223,953
Messages
6,175,598
Members
452,658
Latest member
GStorm

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