+ Reply to Thread
Results 1 to 9 of 9

Copy and Past to Differerent Work Sheet

Hybrid View

  1. #1
    Terry
    Guest

    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. #2
    sebastienm
    Guest

    RE: 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. #3
    Terry
    Guest

    RE: 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. #4
    sebastienm
    Guest

    RE: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1