Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Auto Copy Text from one work sheet to another | Excel Worksheet Functions | |||
visual basic. find copy row past into new sheet | Excel Worksheet Functions | |||
Copy range and past on another sheet | Excel Worksheet Functions | |||
Macro: Insert, copy and past data from sheet | Excel Discussion (Misc queries) | |||
How do I copy a formula from one work sheet to another? | Excel Worksheet Functions |