Increment second columns based on names in the first column

FryGirl

Well-known Member
Joined
Nov 11, 2008
Messages
1,360
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I can't seen to get a formula to work in column E starting in Row 2. In column B, there are names, and if this person worked on example, 1-Jan-17 date, they also work 3 days later on 4-Jan-17 and so on.

You can see there are potentially more dates in column A which make column D not the same. So for example, Person 5 on 29-Jan-17 is on duty for 1-Feb-17 so row 6 in column E should be skipped and then Person 5 shows up on row 7.

Data Range
A​
B​
C​
D​
E​
2​
1-Jan-17​
Person 1​
4-Jan-17​
Person 1​
3​
8-Jan-17​
Person 2​
11-Jan-17​
Person 2​
4​
15-Jan-17​
Person 3​
18-Jan-17​
Person 3​
5​
22-Jan-17​
Person 4​
25-Jan-17​
Person 4​
6​
29-Jan-17​
Person 5​
7​
1-Feb-17​
Person 5​
8​
5-Feb-17​
Person 6​
8-Feb-17​
Person 6​
9​
12-Feb-17​
Person 7​
15-Feb-17​
Person 7​
10​
19-Feb-17​
Person 8​
22-Feb-17​
Person 8​
11​
26-Feb-17​
Person 9​
12​
1-Mar-17​
Person 9​
13​
5-Mar-17​
Person 1​
8-Mar-17​
Person 1​
14​
12-Mar-17​
Person 2​
15-Mar-17​
Person 2​
15​
19-Mar-17​
Person 3​
22-Mar-17​
Person 3​
16​
26-Mar-17​
Person 4​
29-Mar-17​
Person 4​
17​
18​
2-Apr-17​
Person 5​
5-Apr-17​
Person 5​
19​
9-Apr-17​
Person 6​
12-Apr-17​
Person 6​
20​
16-Apr-17​
Person 7​
19-Apr-17​
Person 7​
21​
23-Apr-17​
Person 8​
26-Apr-17​
Person 8​
22​
30-Apr-17​
Person 9​
23​
3-May-17​
Person 9​
24​
7-May-17​
Person 1​
10-May-17​
Person 1​
25​
14-May-17​
Person 2​
17-May-17​
Person 2​
26​
21-May-17​
Person 3​
24-May-17​
Person 3​
27​
28-May-17​
Person 4​
31-May-17​
Person 4​
28​
29​
4-Jun-17​
Person 5​
7-Jun-17​
Person 5​
30​
11-Jun-17​
Person 6​
14-Jun-17​
Person 6​
31​
18-Jun-17​
Person 7​
21-Jun-17​
Person 7​
32​
25-Jun-17​
Person 8​
28-Jun-17​
Person 8​
33​
34​
2-Jul-17​
Person 9​
5-Jul-17​
Person 9​
35​
9-Jul-17​
Person 1​
12-Jul-17​
Person 1​
36​
16-Jul-17​
Person 2​
19-Jul-17​
Person 2​
37​
23-Jul-17​
Person 3​
26-Jul-17​
Person 3​
38​
30-Jul-17​
Person 4​

<tbody>
</tbody>
 
Last edited:

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Thank you very much. This works good. I over complicated it and eventually came up with =IF(N(D2),IF(AND(A2="",N(A1),N(D2)),B1,B2),"")

Still not as compact as your suggestion.
 
Upvote 0

Forum statistics

Threads
1,213,486
Messages
6,113,932
Members
448,533
Latest member
thietbibeboiwasaco

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