Curious_Data
New Member
- Joined
- Dec 11, 2016
- Messages
- 1
Hi,
I'm new to this forum so hope this hasn't been asked before.
I have a large data set where I have rows that contain the same data on 2 columns. Let's call them ID number and Car Model. I only want to combine the rows IF ID + Car Make = ID + Car Make of another row (e.g. duplicate) AND the date of sale is within 1 day of the date of purchase of the other car.
If we combine these values I want the Earliest buy date to be kept and the Latest Sale Date to be kept.
e.g.[TABLE="width: 500"]
<tbody>[TR]
[TD]ID number[/TD]
[TD]Car Model[/TD]
[TD]Purchase Date[/TD]
[TD]Sale Date[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]Skoda[/TD]
[TD]01/02/2017 08:00[/TD]
[TD]01/10/2017 16:00[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]Skoda[/TD]
[TD]01/10/2017 08:00[/TD]
[TD]02/10/2017 08:00[/TD]
[/TR]
</tbody>[/TABLE]
I've tried:
List ID number in order using Filter
Combine ID number and Car Model (CONTANTE) =CONTANTE(A2,B2)
New Column
=IF(C3-D2<=1, "True","False")
Then I highlight the duplicates (combined ID and Car Model) and if the first of the duplicates in "True" then I combine them.
All seems too complicated. Any help would be great!
Thanks
I'm new to this forum so hope this hasn't been asked before.
I have a large data set where I have rows that contain the same data on 2 columns. Let's call them ID number and Car Model. I only want to combine the rows IF ID + Car Make = ID + Car Make of another row (e.g. duplicate) AND the date of sale is within 1 day of the date of purchase of the other car.
If we combine these values I want the Earliest buy date to be kept and the Latest Sale Date to be kept.
e.g.[TABLE="width: 500"]
<tbody>[TR]
[TD]ID number[/TD]
[TD]Car Model[/TD]
[TD]Purchase Date[/TD]
[TD]Sale Date[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]Skoda[/TD]
[TD]01/02/2017 08:00[/TD]
[TD]01/10/2017 16:00[/TD]
[/TR]
[TR]
[TD]1234[/TD]
[TD]Skoda[/TD]
[TD]01/10/2017 08:00[/TD]
[TD]02/10/2017 08:00[/TD]
[/TR]
</tbody>[/TABLE]
I've tried:
List ID number in order using Filter
Combine ID number and Car Model (CONTANTE) =CONTANTE(A2,B2)
New Column
=IF(C3-D2<=1, "True","False")
Then I highlight the duplicates (combined ID and Car Model) and if the first of the duplicates in "True" then I combine them.
All seems too complicated. Any help would be great!
Thanks