Jump to content
Macro Express Forums

Copy Data Out Of Excel Spreadsheet?


Recommended Posts

I have a spreadsheet that has name address and phone number information


I wanted to be able to have excel closed and run a macro that would access that file and pull a row or column out to paste into the text file I am working on, ie different name and addresses depending on who I am writing a letter for ie hit f1 and it pulle data from address.xls column 1 row 1,2,3,4,5 and pastes it in the text file I am currently working on...

Link to comment
Share on other sites

I do this exact thing in many of my macros. You can have your macro open the excel file go to the line desired by doing a find or by just going line by line. You can then have the macro copy cell, assign to a variable, arrow right, copy next cell, assign to a variable, arrow right, etc. etc. You can then have the macro close the excel file, open or activate your Word or other document and then copy the data into the correct spot by using the variables. I have a macro that takes information line by line off of an excel spreadsheet withover 13000 lines of information and put's it into letters and ten processes that information in our company's billing system.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...