MrsFraser07
New Member
- Joined
- Aug 16, 2017
- Messages
- 44
- Office Version
- 365
- Platform
- Windows
- MacOS
Hi there, I get an awful government report every month that I want to have a macro that will automatically copy and paste multiple times. The file looks like this when I get it:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]License Number
[/TD]
[TD]License Status
[/TD]
[TD]UWI
[/TD]
[TD]Deemed Asset Value
[/TD]
[TD]Deemed Liability Amount
[/TD]
[TD]PVS Value
[/TD]
[/TR]
[TR]
[TD]25393
[/TD]
[TD]Suspension
[/TD]
[TD]12-28-081-09W5
[/TD]
[TD][/TD]
[TD]83956
[/TD]
[TD]Inactive
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Type
[/TD]
[TD]Liability
[/TD]
[TD]Included in Cost
[/TD]
[TD]Deemed Liability Amount
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Abandonment
[/TD]
[TD]WB Abandonment
[/TD]
[TD]Y
[/TD]
[TD]60081
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Reclamation
[/TD]
[TD]Site Reclamation
[/TD]
[TD]Y
[/TD]
[TD]23875
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]28928
[/TD]
[TD]Issued
[/TD]
[TD]04-16-085-09W5
[/TD]
[TD][/TD]
[TD]92614
[/TD]
[TD]Active
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Type
[/TD]
[TD]Liability
[/TD]
[TD]Included in Cost
[/TD]
[TD]Deemed Liability Amount
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Abandonment
[/TD]
[TD]Additional Event
[/TD]
[TD]Y
[/TD]
[TD]13748
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Abandonment
[/TD]
[TD]WB Abandonment
[/TD]
[TD]Y
[/TD]
[TD]54991
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Reclamation
[/TD]
[TD]Site Reclamation
[/TD]
[TD]Y
[/TD]
[TD]23875
[/TD]
[/TR]
</tbody>[/TABLE]
What I would like my macro to do, is delete the blank rows (there are always 2 between each data set per license number), then copy the license number, then paste it in all the blank cells underneath it until it reaches the next unique license number. Then copy the new license number, paste into all blank rows beneath it, until it reaches the next, and so on. Hopefully that make sense? Any help would be most appreciated! My report currently has over 25,000 rows and I would hate to have to copy and paste them!
Thanks!
Shari
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]License Number
[/TD]
[TD]License Status
[/TD]
[TD]UWI
[/TD]
[TD]Deemed Asset Value
[/TD]
[TD]Deemed Liability Amount
[/TD]
[TD]PVS Value
[/TD]
[/TR]
[TR]
[TD]25393
[/TD]
[TD]Suspension
[/TD]
[TD]12-28-081-09W5
[/TD]
[TD][/TD]
[TD]83956
[/TD]
[TD]Inactive
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Type
[/TD]
[TD]Liability
[/TD]
[TD]Included in Cost
[/TD]
[TD]Deemed Liability Amount
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Abandonment
[/TD]
[TD]WB Abandonment
[/TD]
[TD]Y
[/TD]
[TD]60081
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Reclamation
[/TD]
[TD]Site Reclamation
[/TD]
[TD]Y
[/TD]
[TD]23875
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]28928
[/TD]
[TD]Issued
[/TD]
[TD]04-16-085-09W5
[/TD]
[TD][/TD]
[TD]92614
[/TD]
[TD]Active
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Type
[/TD]
[TD]Liability
[/TD]
[TD]Included in Cost
[/TD]
[TD]Deemed Liability Amount
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Abandonment
[/TD]
[TD]Additional Event
[/TD]
[TD]Y
[/TD]
[TD]13748
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Abandonment
[/TD]
[TD]WB Abandonment
[/TD]
[TD]Y
[/TD]
[TD]54991
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]Reclamation
[/TD]
[TD]Site Reclamation
[/TD]
[TD]Y
[/TD]
[TD]23875
[/TD]
[/TR]
</tbody>[/TABLE]
What I would like my macro to do, is delete the blank rows (there are always 2 between each data set per license number), then copy the license number, then paste it in all the blank cells underneath it until it reaches the next unique license number. Then copy the new license number, paste into all blank rows beneath it, until it reaches the next, and so on. Hopefully that make sense? Any help would be most appreciated! My report currently has over 25,000 rows and I would hate to have to copy and paste them!
Thanks!
Shari