Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
how can you let macro determine to where to copy
Hi,
I've got several sheets with the same info but in a different layout in columns. The column headers are identical. The sheets have a different number of rows. Can I get a macro te "read" the header and copy that cell value to another sheet under the corresponding header. Row by row cell by cell. Cheers, Harold Example of sheet: NAM.xls to be copied to: TOTAL.xls name sz Trays Loss Nett Trays Gross Price ... ... ... a 10 100 4 96 576 b 12 110 5 105 630 c 14 150 8 142 852 .... .... .... |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
how can you let macro determine to where to copy
Use Application.Match to find where it is in the target sheet
ColNum = Application.Match(Range("A1", Workbooks("Total.xls").Worksheets(1).Rows(1) Workbooks("Total.xls").Worksheets(1).Cells(2,ColNu m).Value = Range("A2").Value -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "mohavv" wrote in message ... Hi, I've got several sheets with the same info but in a different layout in columns. The column headers are identical. The sheets have a different number of rows. Can I get a macro te "read" the header and copy that cell value to another sheet under the corresponding header. Row by row cell by cell. Cheers, Harold Example of sheet: NAM.xls to be copied to: TOTAL.xls name sz Trays Loss Nett Trays Gross Price ... ... ... a 10 100 4 96 576 b 12 110 5 105 630 c 14 150 8 142 852 ... ... ... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Use Combo Box value to determine macro used | Excel Worksheet Functions | |||
Macro to copy | New Users to Excel | |||
How to determine within a macro if a cell contains a hyperlink. | Excel Discussion (Misc queries) | |||
How to determine if a cell has a value, then copy it to a new loca | Excel Worksheet Functions | |||
macro to compare multiple cells to determine value | Excel Worksheet Functions |