mansoorsak
New Member
- Joined
- Sep 19, 2011
- Messages
- 18
I am looking for VBA code that can copy the data of multiple (4) columns based on header names from all the sheets in a workbook and paste (append the data of all the sheets) it into another sheet in the same workbook, where the values in one of the columns header should be <> 0.
For example
Out of say 30 column headers in sheet4, look for column headers with the name "order_id", "product_id", "short_charged_new" & "warehouse_state".
Then copy the values to "Sheet 1" in first 4 columns with the name "order_id", "product_id", "short_charged_new" & "warehouse_state" and in column 5 it should filldown the sheet name (sheet4) from the sheet where we copy the data . Here the copied values in column "short_charged_new" <> 0. Likewise it should search for columns & copy the data based on about criteria of all the sheets in the same workbook and paste (append) the data in sheet1 (first 4 columns) apart from sheet 1, sheet 2 & sheet 3.
For example
Out of say 30 column headers in sheet4, look for column headers with the name "order_id", "product_id", "short_charged_new" & "warehouse_state".
Then copy the values to "Sheet 1" in first 4 columns with the name "order_id", "product_id", "short_charged_new" & "warehouse_state" and in column 5 it should filldown the sheet name (sheet4) from the sheet where we copy the data . Here the copied values in column "short_charged_new" <> 0. Likewise it should search for columns & copy the data based on about criteria of all the sheets in the same workbook and paste (append) the data in sheet1 (first 4 columns) apart from sheet 1, sheet 2 & sheet 3.
Last edited: