Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find specific column titles and copy the column to new workboo JLGWhiz Excel Programming 0 December 11th 06 11:23 PM
Find specific column titles and copy the column to new workboo JLGWhiz Excel Programming 0 December 11th 06 11:09 PM
find a specific value in a column and write another column MUSTANG Excel Discussion (Misc queries) 2 February 5th 06 09:24 AM
Auto find a specific row and copy it to another worksheet hme Excel Programming 0 November 2nd 04 08:37 AM
Auto find a specific row and copy it to another worksheet hme Excel Programming 1 November 1st 04 02:29 PM


All times are GMT +1. The time now is 02:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"