Avatar of Chuck Lowe
Chuck Lowe

asked on 

vba access copy specific excel cells to another spreadsheet

I am using Access as a front end tool. I need to open a source spreadsheet and copy selected cells (reformatting some) to a new workbook as csv output.

The source spreadsheet has repeating headers so I want to skip them and put out my own headers (12 in total only once). I will skip the headers so I look for a value or "A" or "C" or "D" in the 1st column. If it's a hit I want to move across the row(I know how to do that with .offset(0,1)). I need to format the ssn as a text field with all leading zeros. I know how to do that. I just need some base code how to do the copy of the selected cells and how to past them to the new spreadsheet. Some cells will be copied as is and some will be reformatted (the aforementioned ssn). I also need the code to open the source file and save the new file as csv.

Thanks in advance. I'm using Office 2013.
Microsoft Access

Avatar of undefined
Last Comment
Chuck Lowe

8/22/2022 - Mon