![]() |
Macro to delete certain data
Hi
I have a report that comes with all kinds of surplus information that I am trying to get rid of so I am left with the best bits. What I want to do is do a macro to delete the words that are not needed, eg - Evaluation Overview Report (this is the same throughout whole report) - Generated: Mar 03 2005 16:15:12 <--- will change - Quality: 64% <--- will change etc etc In the above the 1st will always be that but there are some that will be different depending on when the report was run, the quality percentage and so on There are about 20 odd things that are duplicated possibly 300 times on each page that I need to clear because what I will then do is delete all the blank rows which will leave me with the data that I want. I can't take out the same rows/columns at the start because they are not concurrent. Any ideas on where to start on this? Any code snippets would be very welcome! Cheers in advance Linds |
Why don't you record a macro doing a simple Find/Replace on the whole
worksheet? -- HTH RP (remove nothere from the email address if mailing direct) "Lindsey M" wrote in message ... Hi I have a report that comes with all kinds of surplus information that I am trying to get rid of so I am left with the best bits. What I want to do is do a macro to delete the words that are not needed, eg - Evaluation Overview Report (this is the same throughout whole report) - Generated: Mar 03 2005 16:15:12 <--- will change - Quality: 64% <--- will change etc etc In the above the 1st will always be that but there are some that will be different depending on when the report was run, the quality percentage and so on There are about 20 odd things that are duplicated possibly 300 times on each page that I need to clear because what I will then do is delete all the blank rows which will leave me with the data that I want. I can't take out the same rows/columns at the start because they are not concurrent. Any ideas on where to start on this? Any code snippets would be very welcome! Cheers in advance Linds |
First, back up your data.............then insert a helper column and fill it
with sequential "line" numbers, 1,2,3,etc for each row........this will give you a reference as to how the data is arranged now. Then pick a column, say A and sort on it..........this will put all like things together for easy removal.......do it again if necessary with another column..........when you're done, sort once more on the new helper column and all is back in order as when you started, except for the things you deleted...........if the data was all consistant enough, this could be recorded into a macro. hth Vaya con Dios, Chuck, CABGx3 "Lindsey M" wrote in message ... Hi I have a report that comes with all kinds of surplus information that I am trying to get rid of so I am left with the best bits. What I want to do is do a macro to delete the words that are not needed, eg - Evaluation Overview Report (this is the same throughout whole report) - Generated: Mar 03 2005 16:15:12 <--- will change - Quality: 64% <--- will change etc etc In the above the 1st will always be that but there are some that will be different depending on when the report was run, the quality percentage and so on There are about 20 odd things that are duplicated possibly 300 times on each page that I need to clear because what I will then do is delete all the blank rows which will leave me with the data that I want. I can't take out the same rows/columns at the start because they are not concurrent. Any ideas on where to start on this? Any code snippets would be very welcome! Cheers in advance Linds |
All times are GMT +1. The time now is 10:27 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com