English Puma
New Member
- Joined
- Jan 25, 2010
- Messages
- 4
Hello All.
I'm trying to write a section of an excel macro which does the folowing:
Starting with cell M2 selected and avtive:
As long as the in column J has a value in (activecell.offset(0,-3)<> vbnullstring), search for a file in a specified folder with the filename in column J.
If the file exists, move the active cell down 1 row and begin the process again
If the file search fails, search for a file which ends with the string in column L (which always has the form ".12345"). Rename that file (there will be one and only ever one), rename it to the value in column J then move the active cell down one row and begin the process again.
I think I can get the Do While set up right but, either can't phrase the file search for "*"&"L2" or the rename file to J bit. Any suggestions???
Thanks
Puma
I'm trying to write a section of an excel macro which does the folowing:
Starting with cell M2 selected and avtive:
As long as the in column J has a value in (activecell.offset(0,-3)<> vbnullstring), search for a file in a specified folder with the filename in column J.
If the file exists, move the active cell down 1 row and begin the process again
If the file search fails, search for a file which ends with the string in column L (which always has the form ".12345"). Rename that file (there will be one and only ever one), rename it to the value in column J then move the active cell down one row and begin the process again.
I think I can get the Do While set up right but, either can't phrase the file search for "*"&"L2" or the rename file to J bit. Any suggestions???
Thanks
Puma