View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] txgizmo@earthlink.net is offline
external usenet poster
 
Posts: 3
Default Directory listing manipulation

I have an Excel file that has a listing of files from multiple directories that was created by importing a
DOS directory listing. it's format is:

Path

File1
File2
File3

for 50,000 files - all in column A.

Can someone write a macro to copy each path to column B in the appropriate row.

The keystrokes a

The keystrokes are (starting in A1):
edit copy 'Copy the path
right
down 2 'to the file info
Shift-left-end-down-right 'get the whole section
edit paste 'paste the path info
end down 'go to the bottom of the path info
down 2 'down 2 more
left 'left to get to the next path

where it will be repeated.

Thank you in advance