Give cell a value depending on value of other cell and list

Antained

New Member
Joined
Jan 5, 2017
Messages
4
Hello,

I have a list of shifts I did with the date. This list expands as I do more shifts.
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Shift[/TD]
[TD]Date[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1[/TD]
[TD]date 1[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]2[/TD]
[TD]date 2[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]3[/TD]
[TD]date 3[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]4[/TD]
[TD]date 4[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]5[/TD]
[TD]date 5[/TD]
[/TR]
</tbody>[/TABLE]

I have another list of deliveries (on another sheet) with the shift given, I want to automatically get the date based on what shift it is.

[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Delivery [/TD]
[TD]Shift of delivery[/TD]
[TD]Date[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]date 1 (automatic)[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]2[/TD]
[TD]1[/TD]
[TD]date 1 (automatic)[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]3[/TD]
[TD]2[/TD]
[TD]date 2 (automatic)[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]4[/TD]
[TD]3[/TD]
[TD]date 3 (automatic)[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]5[/TD]
[TD]3[/TD]
[TD]date 3 (automatic)[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]6[/TD]
[TD]3[/TD]
[TD]date 3 (automatic)[/TD]
[/TR]
</tbody>[/TABLE]


I understand that I could do a long IF but as I keep getting more shifts and more dates, I would have to manually update that if all the time.
What should the formula be for the Date in the Delivery list be?
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
I found it! I needed the VLOOKUP function.
Learned it with a simple youtube tutorial.
Formula in my case was: =VLOOKUP(D1,Sheet1!A:B,2,FALSE)
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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