Match multiple columns and retain the latest updated along with next related rows

praveenpatel421983

New Member
Joined
Aug 17, 2017
Messages
41
Hi,
Just to let you guys know my knowledge on excel vba is average. I have always used this forum for help when required and it has been great help!
Now I am stuck with this. Please help!

My excel has many more than 25 columns. I am trying to demonstrate using 4 columns here.

1st column = File Name
2nd column = Revision
3rd column = Date of revision
4th column = Places it is sent (This can be happen in many places and hence can be more than 1 row)

* First it has to check first column and see the string in duplicated or not.
* If duplicated then check second column and find the latest revision of the file.
* If latest revision is found at only one place then retain the latest revision and delete the other versions of the file details along with next rows belonging to that
* If latest revision is duplicated then find the latest date of revision.
* If latest date of revision is found at only one place then retain the latest date of revision and delete the other versions of the file details along with next rows belonging to that.
* If latest date of revision is duplicated then retain any one of them.

I have tried adding for loops and if statement but it is becoming too long and also not deleting the right one. The program failed totally. I have been trying from 2 days and didnt find the right solution. Thats why I am here. Please help.

File nameRevision of FileDate of RevisionPlace
AppleD12-01-2018xx
yy
zz
Orange12-01-2018xx
yy
zz
AppleD12-01-2018xx
yy
zz
Orange11-01-2018xx
yy
zz
Apple12-01-2018xx
yy
zz
AppleD11-01-2018xx
yy
zz
AppleB10-01-2018xx
yy
zz

<tbody>
</tbody>

<tbody>
</tbody>

Thanks in advance!
Praveen
 
Last edited:

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Forum statistics

Threads
1,215,073
Messages
6,122,975
Members
449,095
Latest member
Mr Hughes

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