Plenty of ideas but confident in your ability to adapt the code already provided. We don't help out on forums like this just to do your work - we expect that you at least attempt to use the things you learn.
Have a close look at the code provided and see if you can work out what each line is doing. There is an if statement that could be expanded to have an alternative when the first test is false
If something below then
move it down
ElseIf something above then
move it up
end if
If you were to modify the code, you would need to define a second range towards the top of the doc and test for the string up there.
Make an attempt at creating a second range and use an ElseIf to search that one. If you can't work it out, post a sample of where you got to and we can provide some assistance.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|