Hi,
I’m using Excel 2007 and I have 2 files, source.xlsx and destination.xls. I have attached the sample files here.
I’m only interested in only a couple columns of data in “Working” worksheet in source.xls file. They are under the header “Part Number”, “In”, and “Category”. There are other columns in between these 3. However the number of column in this source file is not always the same. For example, the file this week may have only 2 random columns in between “Part Number” and “In”. Next week, the number of random columns in between them maybe 10. So it’s important for me to identify the data by the exact column header name.
I want to copy all data under header “Part Number”, “In”, and “Category” in source.xlsx, and then paste them to destination.xls (to be saved as Excel 97-2003 workbook). In “destination.xls”, the data should go to the row (insert new row) under the header “*Item Name”, “Qty Count”, and “Cat”. Also, under the header “New Name”, it will take the value from “*Item Name” then append a string “-NEW” to it.
Does anyone here know how to do this with vba code?
Bookmarks