Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find last column, move formulas over, copy/paste data | Excel Worksheet Functions | |||
copy, paste into a 'found' row on another sheet problem...... | Excel Programming | |||
Find text in another workbook and paste if found match - VBA | Excel Discussion (Misc queries) | |||
Copy Rows found using Find All feature | Excel Discussion (Misc queries) | |||
If found, then copy and paste contents, otherwise move on | Excel Programming |