Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 193
Default Copy and Past to Differerent Work Sheet

Good moning folks:
I am trying to search-copy Key Word and data in same column - paste to
different worksheet different column
i am very new to this vb i have most code for formating cells understood
and still at a quandry as to where to start for this, example below.
IGSS1 IGSS2 IDSX BVDSX VTH1 RDSP1
5.20E-10 -2.48E-09 1.1999000E-06 0.3920 0.5380 0.4154
1.28E-09 -1.56E-09 1.1999000E-06 0.3880 0.5388 0.4150
-6.00E-10 -1.60E-09 1.1999000E-06 0.3880 0.5388 0.4148
I would like to have BVDSX in column B IGSS1 in column C as an example.
Thanks very much in advance
Terry
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Copy and Past to Differerent Work Sheet

Hi,

Here is a quick example: copying column D on active sheet to column B of
sheet2 of the activeworkbook.
1. It sets 2 ranges : rgOrigin and rgDestination.
2. it copies rgOrigin to rgDestination
'------------------------------------
Sub test()
Dim rgOrigin As Range, rgDestination As Range

'Set origin and destination
Set rgOrigin = ActiveSheet.Range("$D:$D")
Set rgDestination = ActiveWorkbook.Sheets("Sheet2").Range("$B:$B")

'Copy Origin to Destination
Application.CutCopyMode = False
rgOrigin.Copy rgDestination

End Sub
'-------------------------------------------
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Terry" wrote:

Good moning folks:
I am trying to search-copy Key Word and data in same column - paste to
different worksheet different column
i am very new to this vb i have most code for formating cells understood
and still at a quandry as to where to start for this, example below.
IGSS1 IGSS2 IDSX BVDSX VTH1 RDSP1
5.20E-10 -2.48E-09 1.1999000E-06 0.3920 0.5380 0.4154
1.28E-09 -1.56E-09 1.1999000E-06 0.3880 0.5388 0.4150
-6.00E-10 -1.60E-09 1.1999000E-06 0.3880 0.5388 0.4148
I would like to have BVDSX in column B IGSS1 in column C as an example.
Thanks very much in advance
Terry

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 193
Default Copy and Past to Differerent Work Sheet

Thanks sebastienm.
This part works great, but i still need code to search keywork and copy
entire column the keyword sits in.

I have this but i am not sure how to incorporate this code into yours.
Sub FindBVDSX()

Cells.Find(What:="BVDSX", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False).Activate

End Sub
Thanks in advance.
--
Terry


"sebastienm" wrote:

Hi,

Here is a quick example: copying column D on active sheet to column B of
sheet2 of the activeworkbook.
1. It sets 2 ranges : rgOrigin and rgDestination.
2. it copies rgOrigin to rgDestination
'------------------------------------
Sub test()
Dim rgOrigin As Range, rgDestination As Range

'Set origin and destination
Set rgOrigin = ActiveSheet.Range("$D:$D")
Set rgDestination = ActiveWorkbook.Sheets("Sheet2").Range("$B:$B")

'Copy Origin to Destination
Application.CutCopyMode = False
rgOrigin.Copy rgDestination

End Sub
'-------------------------------------------
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Terry" wrote:

Good moning folks:
I am trying to search-copy Key Word and data in same column - paste to
different worksheet different column
i am very new to this vb i have most code for formating cells understood
and still at a quandry as to where to start for this, example below.
IGSS1 IGSS2 IDSX BVDSX VTH1 RDSP1
5.20E-10 -2.48E-09 1.1999000E-06 0.3920 0.5380 0.4154
1.28E-09 -1.56E-09 1.1999000E-06 0.3880 0.5388 0.4150
-6.00E-10 -1.60E-09 1.1999000E-06 0.3880 0.5388 0.4148
I would like to have BVDSX in column B IGSS1 in column C as an example.
Thanks very much in advance
Terry

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Copy and Past to Differerent Work Sheet

1. What do you mean by 'search keyword'... where can this keyword be found?
any cell like C52, or just in column A, ...??
2. Then, how do you determine the destination? ie which column, and in which
row to start (row1?).
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Terry" wrote:

Thanks sebastienm.
This part works great, but i still need code to search keywork and copy
entire column the keyword sits in.

I have this but i am not sure how to incorporate this code into yours.
Sub FindBVDSX()

Cells.Find(What:="BVDSX", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False).Activate

End Sub
Thanks in advance.
--
Terry


"sebastienm" wrote:

Hi,

Here is a quick example: copying column D on active sheet to column B of
sheet2 of the activeworkbook.
1. It sets 2 ranges : rgOrigin and rgDestination.
2. it copies rgOrigin to rgDestination
'------------------------------------
Sub test()
Dim rgOrigin As Range, rgDestination As Range

'Set origin and destination
Set rgOrigin = ActiveSheet.Range("$D:$D")
Set rgDestination = ActiveWorkbook.Sheets("Sheet2").Range("$B:$B")

'Copy Origin to Destination
Application.CutCopyMode = False
rgOrigin.Copy rgDestination

End Sub
'-------------------------------------------
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Terry" wrote:

Good moning folks:
I am trying to search-copy Key Word and data in same column - paste to
different worksheet different column
i am very new to this vb i have most code for formating cells understood
and still at a quandry as to where to start for this, example below.
IGSS1 IGSS2 IDSX BVDSX VTH1 RDSP1
5.20E-10 -2.48E-09 1.1999000E-06 0.3920 0.5380 0.4154
1.28E-09 -1.56E-09 1.1999000E-06 0.3880 0.5388 0.4150
-6.00E-10 -1.60E-09 1.1999000E-06 0.3880 0.5388 0.4148
I would like to have BVDSX in column B IGSS1 in column C as an example.
Thanks very much in advance
Terry

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
Auto Copy Text from one work sheet to another Southern Boy Excel Worksheet Functions 2 January 10th 08 06:26 PM
visual basic. find copy row past into new sheet Chuck Excel Worksheet Functions 3 December 17th 07 09:02 PM
Copy range and past on another sheet gumby Excel Worksheet Functions 3 July 17th 07 11:54 PM
Macro: Insert, copy and past data from sheet Metaldream7 Excel Discussion (Misc queries) 0 November 8th 06 09:31 PM
How do I copy a formula from one work sheet to another? help needed please Excel Worksheet Functions 1 September 14th 06 03:59 AM


All times are GMT +1. The time now is 09:56 PM.

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

About Us

"It's about Microsoft Excel"