![]() |
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 |
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 |
Copy and Past to Differerent Work Sheet
BVDSX could be found anywhere unfortunately the data comes from diff
locations all have different formatting preferences, when wafers are built they go to Probing where data is extracted and then diff location where dies are packaged then they go through final testing, then go to my place where a diff set of hands touch, Im trying to get data in one format where everyone can understand and parameters easy to locate at a glance, the data has spaces and << signs which makes things really complicated - I have that formatting under control I think : ) I would like all data under BVDSX copied. Thanks for taking the time; this will save me a lot of time, hours or days of formatting and summing data Thanks again Terry "sebastienm" wrote: Ok, i think i get it except one thing: - On the origin sheet, could BVDSX appear really anywhere (eg: G52) or only somewhere in a specific row, say in row 1 eg found in G1? - If anywhere, say it is found in G52, does that mean the macro should copy data in G53 and below or the entire column G? -- Regards, Sébastien <http://www.ondemandanalysis.com "Terry" wrote: Hi: Keyword meaning something like BVDSX - somtimes the data comes with BVDSX and other parameters in different columns - i need to search entire page for BVDSX and place in desired location on different page. say Column A1 for BVDSX, Column B1 for IGSS1, the Keyword is going to be the header name like "BVDSX" and all the data will be under it. Thanks -- Terry "sebastienm" wrote: 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 |
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 |
Copy and Past to Differerent Work Sheet
Hi:
Keyword meaning something like BVDSX - somtimes the data comes with BVDSX and other parameters in different columns - i need to search entire page for BVDSX and place in desired location on different page. say Column A1 for BVDSX, Column B1 for IGSS1, the Keyword is going to be the header name like "BVDSX" and all the data will be under it. Thanks -- Terry "sebastienm" wrote: 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 |
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 |
Copy and Past to Differerent Work Sheet
Ok, i think i get it except one thing:
- On the origin sheet, could BVDSX appear really anywhere (eg: G52) or only somewhere in a specific row, say in row 1 eg found in G1? - If anywhere, say it is found in G52, does that mean the macro should copy data in G53 and below or the entire column G? -- Regards, Sébastien <http://www.ondemandanalysis.com "Terry" wrote: Hi: Keyword meaning something like BVDSX - somtimes the data comes with BVDSX and other parameters in different columns - i need to search entire page for BVDSX and place in desired location on different page. say Column A1 for BVDSX, Column B1 for IGSS1, the Keyword is going to be the header name like "BVDSX" and all the data will be under it. Thanks -- Terry "sebastienm" wrote: 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 |
Copy and Past to Differerent Work Sheet
Hi Terry,
The sub CopyDataColumn: -Searches for a string (SearchedTerm) within a worksheet (SearchedSheet). The whole cell must contain the searched string, say "BVDSX". If you are looking for partial match, search for "BVDSX*" instead (with the wildcard character * ) -If not found, the sub just exits. -If found, the sub determines the end of the data in that column. -finally it copies the searched string + the its data column in the destination range (Destination). Sub test() 'Search for BVDSX in the active sheet and copy data to sheet2 range b1 of the ' active workbook CopyDataColumn _ "BVDSX", ActiveSheet, ActiveWorkbook.Sheets("sheet2").Range("b1") End Sub '------------------------------------ Sub CopyDataColumn( _ SearchedTerm As String, SearchedSheet As Worksheet, Destination As Range) Dim rgOrigin As Range, rg As Range 'Find SearchedTerm Set rgOrigin = SearchedSheet.Cells.Find(what:=SearchedTerm, LookIn:=xlValues, lookat:=xlWhole) If rgOrigin Is Nothing Then Exit Sub 'Set origin Set rgOrigin = Application.Range(rgOrigin, rgOrigin.EntireColumn.Cells(65536).End(xlUp)) 'Copy Origin to Destination Application.CutCopyMode = False rgOrigin.Copy Destination.Cells(1) End Sub '------------------------------------------- -- Regards, Sébastien <http://www.ondemandanalysis.com "Terry" wrote: BVDSX could be found anywhere unfortunately the data comes from diff locations all have different formatting preferences, when wafers are built they go to Probing where data is extracted and then diff location where dies are packaged then they go through final testing, then go to my place where a diff set of hands touch, Im trying to get data in one format where everyone can understand and parameters easy to locate at a glance, the data has spaces and << signs which makes things really complicated - I have that formatting under control I think : ) I would like all data under BVDSX copied. Thanks for taking the time; this will save me a lot of time, hours or days of formatting and summing data Thanks again Terry |
Copy and Past to Differerent Work Sheet
Thanks sebastienm. It works perfect.
You folks are great, my hats off to you. -- Terry "sebastienm" wrote: Hi Terry, The sub CopyDataColumn: -Searches for a string (SearchedTerm) within a worksheet (SearchedSheet). The whole cell must contain the searched string, say "BVDSX". If you are looking for partial match, search for "BVDSX*" instead (with the wildcard character * ) -If not found, the sub just exits. -If found, the sub determines the end of the data in that column. -finally it copies the searched string + the its data column in the destination range (Destination). Sub test() 'Search for BVDSX in the active sheet and copy data to sheet2 range b1 of the ' active workbook CopyDataColumn _ "BVDSX", ActiveSheet, ActiveWorkbook.Sheets("sheet2").Range("b1") End Sub '------------------------------------ Sub CopyDataColumn( _ SearchedTerm As String, SearchedSheet As Worksheet, Destination As Range) Dim rgOrigin As Range, rg As Range 'Find SearchedTerm Set rgOrigin = SearchedSheet.Cells.Find(what:=SearchedTerm, LookIn:=xlValues, lookat:=xlWhole) If rgOrigin Is Nothing Then Exit Sub 'Set origin Set rgOrigin = Application.Range(rgOrigin, rgOrigin.EntireColumn.Cells(65536).End(xlUp)) 'Copy Origin to Destination Application.CutCopyMode = False rgOrigin.Copy Destination.Cells(1) End Sub '------------------------------------------- -- Regards, Sébastien <http://www.ondemandanalysis.com "Terry" wrote: BVDSX could be found anywhere unfortunately the data comes from diff locations all have different formatting preferences, when wafers are built they go to Probing where data is extracted and then diff location where dies are packaged then they go through final testing, then go to my place where a diff set of hands touch, Im trying to get data in one format where everyone can understand and parameters easy to locate at a glance, the data has spaces and << signs which makes things really complicated - I have that formatting under control I think : ) I would like all data under BVDSX copied. Thanks for taking the time; this will save me a lot of time, hours or days of formatting and summing data Thanks again Terry |
All times are GMT +1. The time now is 10:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com