Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find specific column and copy row.
Ok last question (on this project).
I need to look at values in row 1 (in an open but non-activated workbook) until I find the word Total (its column letter will change depending on other info, for example it may be H one week then M another). Then I need to figure out which column that is. Then I need to copy a particular cell in that column (that row number will never change), to a cell on my currently open workbook. Thanks Kevin Porter |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find specific column and copy row.
Kevin, try using the "Find" Method:
Dim ColToFind As Long 'This assumes row 4, replace with your row number: With Rows(4) ColToFind = .Find(What:="Total", After:=.Cells(.Columns.Count), _ SearchOrder:=xlbyRows).Column End With Cells(YourConstantRow,ColToFind).Copy -- Charles Chickering "A good example is twice the value of good advice." "Kevin Porter" wrote: Ok last question (on this project). I need to look at values in row 1 (in an open but non-activated workbook) until I find the word Total (its column letter will change depending on other info, for example it may be H one week then M another). Then I need to figure out which column that is. Then I need to copy a particular cell in that column (that row number will never change), to a cell on my currently open workbook. Thanks Kevin Porter |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find specific column and copy row.
Works great. Thank you.
"Charles Chickering" wrote: Kevin, try using the "Find" Method: Dim ColToFind As Long 'This assumes row 4, replace with your row number: With Rows(4) ColToFind = .Find(What:="Total", After:=.Cells(.Columns.Count), _ SearchOrder:=xlbyRows).Column End With Cells(YourConstantRow,ColToFind).Copy -- Charles Chickering "A good example is twice the value of good advice." "Kevin Porter" wrote: Ok last question (on this project). I need to look at values in row 1 (in an open but non-activated workbook) until I find the word Total (its column letter will change depending on other info, for example it may be H one week then M another). Then I need to figure out which column that is. Then I need to copy a particular cell in that column (that row number will never change), to a cell on my currently open workbook. Thanks Kevin Porter |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find specific column titles and copy the column to new workboo | Excel Programming | |||
Find specific column titles and copy the column to new workboo | Excel Programming | |||
find a specific value in a column and write another column | Excel Discussion (Misc queries) | |||
Auto find a specific row and copy it to another worksheet | Excel Programming | |||
Auto find a specific row and copy it to another worksheet | Excel Programming |