Find closed date and next one open

trimiii

Board Regular
Joined
May 15, 2018
Messages
69
Office Version
  1. 365
Platform
  1. Windows
Fellas,

I have 2000 service order by VIN's in column A (sheet1) with different closed dates (example, VIN# 111 service order completed on 1 Jun2019.
In the sheet2 I need to find if VIN 111 when is next service order open after 1 Jun or next one (see example below:

sheet1:
ab
VINdate, Service order closed
1111 Jun2019
1125 Jun 2019
1136 Jun 2019

<tbody>
</tbody>

Sheet 2
abcdfg
VINdate, open (1)date, open (2)date, open (3)date, open (4)date, open (5)
1111 Jun 20196 Jun 201912 Jun 2019
1125 Jun 20196 Jun 201915 Jun 19
1136 Jun 201916 Jun 2019

<tbody>
</tbody>

So what I need is to find out is, VIN#111 closed date (sheet1) and next date open if its same day OR next one.
example: VIN#111, closed service order 1 Jun 2019 (sheet 1), next open is 1 Jun 2019 (sheet 2) and next one on line which is 6 Jun 2019.

Looking forward for reply,
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
In your sample data, the data on Sheet 2, column b, always matches the date in Sheet 1, column b, for the same VIN.
Is this ALWAYS TRUE in your data, OR, is it POSSIBLE that there may be dates in sheet 2 for a specific VIN that are EARLIER than the date in Sheet 1 col B ?
If this is ALWAYS TRUE, then the problem is relatively easy to solve with a simple lookup.
If it's not always true, it's still do-able but is a bit more complex.
 
Upvote 0
Hi Mr. Gerald Higgins,

Is this ALWAYS TRUE in your data, OR, is it POSSIBLE that there may be dates in sheet 2 for a specific VIN that are EARLIER than the date in Sheet 1 col B ? -
> YES, the vin# is always TRUE

looking forward for your reply...
 
Upvote 0
Hmm . . . this is a bit vague.

Note, I'm NOT asking
Is the vin# always TRUE ?

I don't even know what it means to say it is always true.

What I'm asking is,
Is it always the case that in sheet 2, the date in column B is always the same as the date in column B on sheet 1, for the same vin# ?

Let's assume it IS always the case.

Let's also assume that your data is laid out so that on both sheets, the first VIN# appears in cell A2.

To deal with a vin# in sheet 1 and look up the corresponding first date in sheet 2, use something like
Code:
=VLOOKUP(Sheet1!A2,Sheet2!$A$2:$F$4,2,FALSE)
and format the result with a date format.

To look up the second date for the same vin#, use something like
Code:
=VLOOKUP(Sheet1!A2,Sheet2!$A$2:$F$4,3,FALSE)
and so on.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,905
Messages
6,122,175
Members
449,071
Latest member
cdnMech

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