How to identify employees living at the same address at the same time

TamStuff

New Member
Joined
Aug 22, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi :)

Have visited this forum loads and have always found an answer to my problem, but this one seems a pretty tricky issue.

We have an allowance that applies per household and I suspect we have a number of employees who may not have received it. I am trying to double check if anyone else in the household was in receipt of the allowance, so need to identify those who were living at the same address at any point.

My file is approx 10,000 rows of data to review. Is there a way to calculate if someone is recorded at the same address during the same time period, sample data set below:
Personnel NumberStreet and House NumberStart DateEnd DateSame address at same time?
Sally Sample103A Kennedy Street
30/04/2012​
13/06/2020​
Help!
John Doe103A Kennedy Street
12/07/2012​
1/01/2020​
Help!
 

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)
I can't see any easy way to do this so probably need a few steps. Here's how I would do it:

1. Make a pivot table of your data, put 'Street and House Number' in the rows area and do a count of this field in the values area. This will tell you how many times each address appears in your list. If the count is 1, you can immediately exclude these addresses as you only care about addresses that are in your data more than once.
2. If the count is 2 or more, add 'StartDate' and 'EndDate' into the values area. Change the aggregation of the 'StartDate' to min and the aggregation of the 'EndDate' to max. Doing this will then give you the minimum start date and max end date for each particular address. Make sure to format the min and max fields as dates like below

1692692938469.png


3. You could then use this pivot table and vlookup the address in your data table and return the min and max dates for that address for each row in your data table.
4. Then you could use a formula on each row of your data to say if the start date is greater than or equal to the min start date and the end date is less than or equal to the max end date, then 1 else 0.
5. You could then use another pivot table including the new fields you've created, put that new 1,0 field in the filters, only select 1. Then drop 'Street and House Number' into the rows again and do a count again. If you have addresses with a count of 2 or more, these should be ones where there was more than one person in the address at the same time.

I think that should you get a close as you can to be honest.
 
Upvote 0
Hi :)

Have visited this forum loads and have always found an answer to my problem, but this one seems a pretty tricky issue.

We have an allowance that applies per household and I suspect we have a number of employees who may not have received it. I am trying to double check if anyone else in the household was in receipt of the allowance, so need to identify those who were living at the same address at any point.

My file is approx 10,000 rows of data to review. Is there a way to calculate if someone is recorded at the same address during the same time period, sample data set below:
Personnel NumberStreet and House NumberStart DateEnd DateSame address at same time?
Sally Sample103A Kennedy Street
30/04/2012​
13/06/2020​
Help!
John Doe103A Kennedy Street
12/07/2012​
1/01/2020​
Help!
I take it that you want to know if there was any overlap of the dates in which a particular person was living at a property. I assume that the date range does not have to be the same
and that the overlap, in terms of days, only need be 1 day.

Let me know if that is not the case.

I did not have much data to go on so I invented some, 'unrealistic' data, but it proves the method works. I thought that having the names there may be useful.

I'm not sure how you are going to process this data but I can help whatever you want to do.

Using Excel to create a schedule table from given data table.xlsm
ABCDE
1Personnel NumberStreet and House NumberStart DateEnd DateSame address at same time?
2Jack Roth4 Kennedy Street10/01/202311/01/2023Jack Roth, Elizabeth East, David Wakeman
3Ursula Tennison2 Kennedy Street07/01/202313/01/2023Ursula Tennison, Cecil Haddow, Leah Portillo, Arnold Wallis
4Ryan Nevin1 Kennedy Street08/01/202318/01/2023Ryan Nevin
5Elizabeth East4 Kennedy Street04/01/202314/01/2023Jack Roth, Elizabeth East, David Wakeman
6Cecil Haddow2 Kennedy Street02/01/202318/01/2023Ursula Tennison, Cecil Haddow, Leah Portillo, Arnold Wallis
7Leah Portillo2 Kennedy Street10/01/202324/01/2023Ursula Tennison, Cecil Haddow, Leah Portillo, Arnold Wallis
8David Wakeman4 Kennedy Street08/01/202321/01/2023Jack Roth, Elizabeth East, David Wakeman
9Tia Desborough3 Kennedy Street01/01/202306/01/2023Tia Desborough
10Arnold Wallis2 Kennedy Street08/01/202317/01/2023Ursula Tennison, Cecil Haddow, Leah Portillo, Arnold Wallis
11Alice Foley3 Kennedy Street10/01/202320/01/2023Alice Foley
Version2
Cell Formulas
RangeFormula
E2:E11E2=TEXTJOIN(", ",TRUE,FILTER($A$2:$A$11,($B2=$B$2:$B$11) * ($C2<=$D$2:$D$11) * ($D2>=$C$2:$C$11)))
 
Upvote 0
Solution
I take it that you want to know if there was any overlap of the dates in which a particular person was living at a property. I assume that the date range does not have to be the same
and that the overlap, in terms of days, only need be 1 day.

Let me know if that is not the case.

I did not have much data to go on so I invented some, 'unrealistic' data, but it proves the method works. I thought that having the names there may be useful.

I'm not sure how you are going to process this data but I can help whatever you want to do.

Using Excel to create a schedule table from given data table.xlsm
ABCDE
1Personnel NumberStreet and House NumberStart DateEnd DateSame address at same time?
2Jack Roth4 Kennedy Street10/01/202311/01/2023Jack Roth, Elizabeth East, David Wakeman
3Ursula Tennison2 Kennedy Street07/01/202313/01/2023Ursula Tennison, Cecil Haddow, Leah Portillo, Arnold Wallis
4Ryan Nevin1 Kennedy Street08/01/202318/01/2023Ryan Nevin
5Elizabeth East4 Kennedy Street04/01/202314/01/2023Jack Roth, Elizabeth East, David Wakeman
6Cecil Haddow2 Kennedy Street02/01/202318/01/2023Ursula Tennison, Cecil Haddow, Leah Portillo, Arnold Wallis
7Leah Portillo2 Kennedy Street10/01/202324/01/2023Ursula Tennison, Cecil Haddow, Leah Portillo, Arnold Wallis
8David Wakeman4 Kennedy Street08/01/202321/01/2023Jack Roth, Elizabeth East, David Wakeman
9Tia Desborough3 Kennedy Street01/01/202306/01/2023Tia Desborough
10Arnold Wallis2 Kennedy Street08/01/202317/01/2023Ursula Tennison, Cecil Haddow, Leah Portillo, Arnold Wallis
11Alice Foley3 Kennedy Street10/01/202320/01/2023Alice Foley
Version2
Cell Formulas
RangeFormula
E2:E11E2=TEXTJOIN(", ",TRUE,FILTER($A$2:$A$11,($B2=$B$2:$B$11) * ($C2<=$D$2:$D$11) * ($D2>=$C$2:$C$11)))
Herakles, this is perfect and does exactly was I was hoping.

Thank you very much!!
 
Upvote 0

Forum statistics

Threads
1,215,084
Messages
6,123,021
Members
449,092
Latest member
ikke

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