IF / VLOOKUP

Pippy79

Board Regular
Joined
Nov 18, 2021
Messages
90
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I have a question, I'm sure its a simple fix but I cant seem to work it out!

I have a look up table below which is my key for days and times.


ABCD
1MP day - 2Collection Day - 2
2MP DayCollection DayCollection TimeDispatch Notification
3MonSat13:00Thurs
4TueSun13:00Fri
5WedSun13:00Fri
6ThuWed11:00Mon
7FriWed11:00Mon
8SatWed11:00Mon
9SunSat13:00Thurs

the start days are pulled from the below date.
MP Day
Wed, 02-Feb-22
Tue, 04-Jan-22
Fri, 07-Jan-22
Fri, 07-Jan-22
Tue, 11-Jan-22
Tue, 11-Jan-22

Using the table above "MP Day" I need to display if the using the key in the below table.

If MP day is Wed show dispatch notification as "Friday", Collection Day as "Sunday," Collection time as "13:00".

Dispatch NotificationCollection DayCollection Time

Thanks
Phyl
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
How about
+Fluff 1.xlsm
ABCDEFGHIJ
1MP day - 2Collection Day - 2MP DayDispatch NotificationCollection DayCollection Time
2MP DayCollection DayCollection TimeDispatch Notification02/02/2022FriSun13:00
3MonSat13:00Thurs04/01/2022FriSun13:00
4TueSun13:00Fri07/01/2022MonWed11:00
5WedSun13:00Fri07/01/2022MonWed11:00
6ThuWed11:00Mon11/01/2022FriSun13:00
7FriWed11:00Mon
8SatWed11:00Mon
9SunSat13:00Thurs
10
Main
Cell Formulas
RangeFormula
H2:J6H2=INDEX(FILTER($B$3:$D$9,$A$3:$A$9=TEXT(G2,"ddd")),{3,1,2})
Dynamic array formulas.
 
Upvote 0
Solution
Thanks Fluff,

what happens if the date is written as "Wed, 02-Feb-22" the calculation doesn't work. is it possible to work with this date format or only the format "02/02/2022"?

Thanks
 
Upvote 0
Are your MP dates text rather than proper dates?
 
Upvote 0
yes i believe they are.

the cell is written as "Wed, 02-Feb-22", but I'm not sure if this is formatted from a date "02/02/22"
 
Upvote 0
If you select the cell & change the format to general, do you still see the text or a number?
 
Upvote 0
it displays this "44594" when i change the format to general
 
Upvote 0
In that case it's a real date & the formula I suggested should work.
 
Upvote 0
Apologies Fluff, my bad. this original formula works perfectly!!

Thanks
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,004
Messages
6,122,659
Members
449,091
Latest member
peppernaut

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