Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default copy & paste the column found by Selection.Find

Hi and thanks for your help.

This is a one off requirement to speed up my day

Thus far, I have the following code. I'm trying to find a column in the
current active worksheet "US_HK", then copy that column to the next
available column in the "HK" worksheet. To simplify the process I place my
curser in the first cell of the column in "HK" where I want the data pasted
to.

Rows("1:1").Select
Selection.Find(What:="Text1", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=
_
xlNext, MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Select
Columns.Select
Selection.Copy
Sheets("HK").Select
ActiveSheet.Paste

Any help will be apprciated.

Cheers
Mark


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default copy & paste the column found by Selection.Find

Try this:-

Rows("1:1").Select
Selection.Find(What:="Text1", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, _
SearchFormat:=False).Activate
ActiveCell.EntireColumn.Select
Selection.Copy
Sheets("HK").Select
ActiveSheet.Paste

Note: You have already activated the cell in the find. No need to select it
again.

Regards,

OssieMac

"Mark" wrote:

Hi and thanks for your help.

This is a one off requirement to speed up my day

Thus far, I have the following code. I'm trying to find a column in the
current active worksheet "US_HK", then copy that column to the next
available column in the "HK" worksheet. To simplify the process I place my
curser in the first cell of the column in "HK" where I want the data pasted
to.

Rows("1:1").Select
Selection.Find(What:="Text1", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=
_
xlNext, MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Select
Columns.Select
Selection.Copy
Sheets("HK").Select
ActiveSheet.Paste

Any help will be apprciated.

Cheers
Mark



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default copy & paste the column found by Selection.Find

many thanks for your help

"OssieMac" wrote in message
...
Try this:-

Rows("1:1").Select
Selection.Find(What:="Text1", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, _
SearchFormat:=False).Activate
ActiveCell.EntireColumn.Select
Selection.Copy
Sheets("HK").Select
ActiveSheet.Paste

Note: You have already activated the cell in the find. No need to select
it
again.

Regards,

OssieMac

"Mark" wrote:

Hi and thanks for your help.

This is a one off requirement to speed up my day

Thus far, I have the following code. I'm trying to find a column in the
current active worksheet "US_HK", then copy that column to the next
available column in the "HK" worksheet. To simplify the process I place
my
curser in the first cell of the column in "HK" where I want the data
pasted
to.

Rows("1:1").Select
Selection.Find(What:="Text1", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=
_
xlNext, MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Select
Columns.Select
Selection.Copy
Sheets("HK").Select
ActiveSheet.Paste

Any help will be apprciated.

Cheers
Mark





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 last column, move formulas over, copy/paste data Mike R. Excel Worksheet Functions 0 September 19th 07 06:40 AM
copy, paste into a 'found' row on another sheet problem...... [email protected] Excel Programming 7 November 26th 06 06:32 PM
Find text in another workbook and paste if found match - VBA Pasmatos Excel Discussion (Misc queries) 1 November 10th 05 01:00 PM
Copy Rows found using Find All feature Scott H Excel Discussion (Misc queries) 3 May 2nd 05 06:04 PM
If found, then copy and paste contents, otherwise move on Dave Peterson[_3_] Excel Programming 0 September 11th 04 12:53 AM


All times are GMT +1. The time now is 04:05 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"