Vlookup/Index based on a person name and date

jimbogarner

Board Regular
Joined
Apr 22, 2010
Messages
103
Hi,

Apologies as I am an excel novice so this may be an easy fix...

I am trying to pull together a costing file whereby if someone enters the following in a sheet, it would return a cost for that person working on that date:

Cell A1: 03-May-2019
Cell B1: Peter Pan
Cell C1: Cost to return from Sheet 2

The issue I am having, is I am trying to get this to lookup from a grid on another sheet (Column $A:$A is a list of names, Row $1:$1 is Cell B1: Jan-19, Cell C1: Feb-19, Cell D1: Mar-19 etc.), however, I can't get it to ignore the day in the formula (in above example 3rd).

I assume the index function would work best but I still can't this to work (nor fully understand it!)

Any help is appreciated.

Thanks,

James
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Click cell B1 in the lookup table. What is displayed in the formula bar?
 
Upvote 0
01/05/2019

I can't change it to 03/05/2019 because I will have people working on the 2nd May, 5th May etc. etc. but they will charge me a set 'May' fee.

Thanks,

James
 
Upvote 0
I assume that the value in A1 is an actual Excel numerical date, formatted to display as a date. What you need to do depends on how the values are saved on your other sheet. If the dates are the other sheet are text values as shown, then use this

TEXT(A1,"mmm-yy")

as your lookup value, not A1. If the dates on the other sheet are actual dates, possibly the 1st day of each month, and formatted to show just the Month-YY, then use this

EOMONTH(A1,-1)+1

as your lookup value.
 
Upvote 0
Try an adaptation of this:

=INDEX(Sheet2!A1:Z1000,MATCH(A2,Sheet2!A1:A1000,0),MATCH(A1-DAY(A1)+1,Sheet2!A1:Z1,0))
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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