titaniumbean
New Member
- Joined
- Mar 19, 2009
- Messages
- 7
Hi, I think this is a very basic question but i'm an utter noob at vba.
I've just started recording some macros to have a look at basic syntax and functions.
I have data brought in from another system which is formatted for printing. So after every x amount of lines it breaks onto another page with the heading information and some page information on each. I want to automate removing all of these with a macro.
I want to search column A for instances of the word 'xyz' then I want to delete the blank row above this word, and the 6 (not all blank) rows below it.
Ideally I then want it to loop and find the (next last) version of the word 'xyz' and do the same until it gets back to the top and finds no instances of the word.
I don't want to just put put Row(8).select selection.delete because I wont know how many pages will have been inputted so I need the script to loop until all instances are cleared rather than assuming i'll know where the instances of 'xyz' are always going to appear.
Does this make sense and if so which direction do I need to be pointed in?
Would it be complicating it too much to want to be able to have some instances of 'xyz' at the top of the page that are essentially in frozen panes and so are not touched.
Thanks in advance.
I've just started recording some macros to have a look at basic syntax and functions.
I have data brought in from another system which is formatted for printing. So after every x amount of lines it breaks onto another page with the heading information and some page information on each. I want to automate removing all of these with a macro.
I want to search column A for instances of the word 'xyz' then I want to delete the blank row above this word, and the 6 (not all blank) rows below it.
Ideally I then want it to loop and find the (next last) version of the word 'xyz' and do the same until it gets back to the top and finds no instances of the word.
I don't want to just put put Row(8).select selection.delete because I wont know how many pages will have been inputted so I need the script to loop until all instances are cleared rather than assuming i'll know where the instances of 'xyz' are always going to appear.
Does this make sense and if so which direction do I need to be pointed in?
Would it be complicating it too much to want to be able to have some instances of 'xyz' at the top of the page that are essentially in frozen panes and so are not touched.
Thanks in advance.