PC Review


Reply
Thread Tools Rate Thread

copy & paste the column found by Selection.Find

 
 
Mark
Guest
Posts: n/a
 
      30th Jul 2007
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 With Quote
 
 
 
 
=?Utf-8?B?T3NzaWVNYWM=?=
Guest
Posts: n/a
 
      30th Jul 2007
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 With Quote
 
Mark
Guest
Posts: n/a
 
      31st Jul 2007
many thanks for your help

"OssieMac" <(E-Mail Removed)> wrote in message
news:2C9F545F-658E-4983-B2D3-(E-Mail Removed)...
> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find last column & copy/paste values BeSmart Microsoft Excel Programming 1 8th Feb 2010 01:28 PM
Copy Selection - Paste Selection - Delete Selection Uninvisible Microsoft Excel Programming 2 25th Oct 2007 01:31 PM
Find last column, move formulas over, copy/paste data =?Utf-8?B?TWlrZSBSLg==?= Microsoft Excel Worksheet Functions 0 19th Sep 2007 06:40 AM
Find first empty cell in column J. Copy, paste special, value from =?Utf-8?B?enp4eGNj?= Microsoft Excel Programming 12 12th Sep 2007 10:34 PM
find last row in one column and copy + paste data to same row in a =?Utf-8?B?RXJpY19H?= Microsoft Excel Programming 2 31st Jul 2007 06:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:10 AM.