+ Reply to Thread
Results 1 to 6 of 6

moving columns and selecting for copying

  1. #1
    Registered User
    Join Date
    06-15-2005
    Posts
    8

    moving columns and selecting for copying

    Hi,

    Excel 97
    I have a macro attached to a button that copies previously marked data from a
    web page to cell D8 on a tempory download sheet, where it is formatted and then copied to another sheet.

    Sub DownloadTABdata()
    '
    ' DownloadTABdata Macro
    ' Macro recorded 1/06/05 by IBM
    '
    ActiveSheet.PasteSpecial Format:="Text", Link:=False, DisplayAsIcon:= _
    False


    End Sub

    Now the data arrives with a list of numbers in col D8:Dxx and names in col F8:Fxx. I want to move the data in F8:Fxx to E8:Exx. The data range is variable from , say, 6 to 24 items.

    After the column move, I want that range (D8:Exx) marked ready for copying on to another sheet.

    Can anyone help with a bit of code to accomplish this task?

    Thanks,
    Neddy
    Last edited by Neddy; 06-15-2005 at 02:18 PM. Reason: adding stuff

  2. #2
    Jim Rech
    Guest

    Re: moving columns and selecting for copying

    Assuming the data is contiguous from F8 downward the cut and paste code
    would look like this:

    Range("F8", Range("F8").End(xlDown)).Cut Range("E8")

    --
    Jim
    "Neddy" <[email protected]> wrote in
    message news:[email protected]...
    |
    | Hi,
    |
    | Excel 97
    | I have a macro attached to a button that copies previously marked data
    | from a
    | web page to cell D8 on a tempory download sheet, where it is formatted
    | and then copied to another sheet.
    |
    | Sub DownloadTABdata()
    | '
    | ' DownloadTABdata Macro
    | ' Macro recorded 1/06/05 by IBM
    | '
    | ActiveSheet.PasteSpecial Format:="Text", Link:=False,
    | DisplayAsIcon:= _
    | False
    |
    |
    | End Sub
    |
    | Now the data arrives with a list of numbers in col D8:Dxx and names in
    | col F8:Fxx. I want to move the data in F8:Fxx to E8:Exx. The data
    | range is variable from , say, 6 to 24 items.
    |
    | After the column move, I want that range (D8:Exx) marked ready for
    | copying on to another sheet.
    |
    | Can anyone help with a bit of code to accomplish this task?
    |
    | Thanks,
    | Neddy
    |
    |
    | --
    | Neddy
    | ------------------------------------------------------------------------
    | Neddy's Profile:
    http://www.excelforum.com/member.php...o&userid=24345
    | View this thread: http://www.excelforum.com/showthread...hreadid=379455
    |



  3. #3
    Registered User
    Join Date
    06-15-2005
    Posts
    8
    Thanks Jim,

    Now to mark the new range(D8:Exx) ready to copy, I suppose I would use
    a variation of that last statement to mark it?

    thanks
    Neddy

  4. #4
    Jim Rech
    Guest

    Re: moving columns and selecting for copying

    Sorry but I don't know what "to mark" means.

    --
    Jim
    "Neddy" <[email protected]> wrote in message
    news:[email protected]...
    |
    | Thanks Jim,
    |
    | Now to mark the new range(D8:Exx) ready to copy, I suppose I would use
    | a variation of that last statement to mark it?
    |
    | thanks
    | Neddy
    |
    |
    | --
    | Neddy
    | ------------------------------------------------------------------------
    | Neddy's Profile:
    http://www.excelforum.com/member.php...o&userid=24345
    | View this thread: http://www.excelforum.com/showthread...hreadid=379455
    |



  5. #5
    Registered User
    Join Date
    06-15-2005
    Posts
    8
    Jim,

    Thanks for your help. Marking is the same as selecting the range that contains
    the data.

    When doing it manually, using the cursor will "mark" the range, and the copy command will put the flashing line around the selection.

    I was wondering if a macro could be used to select the range D8:Exx that was
    created by the last statement and somehow invoke the copy command without
    it actually copying. I have to then move to the other sheet and manually use the
    paste button.


    Hope that makes sense


    Thanks
    Neddy

  6. #6
    Jim Rech
    Guest

    Re: moving columns and selecting for copying

    I think you want something like this:

    Range("F8", Range("F8").End(xlDown)).Cut Range("E8")
    Range("D8", Range("D8").End(xlDown)).Resize(, 2).Copy


    --
    Jim
    "Neddy" <[email protected]> wrote in message
    news:[email protected]...
    |
    | Jim,
    |
    | Thanks for your help. Marking is the same as selecting the range that
    | contains
    | the data.
    |
    | When doing it manually, using the cursor will "mark" the range, and the
    | copy command will put the flashing line around the selection.
    |
    | I was wondering if a macro could be used to select the range D8:Exx
    | that was
    | created by the last statement and somehow invoke the copy command
    | without
    | it actually copying. I have to then move to the other sheet and
    | manually use the
    | paste button.
    |
    |
    | Hope that makes sense
    |
    |
    | Thanks
    | Neddy
    |
    |
    | --
    | Neddy
    | ------------------------------------------------------------------------
    | Neddy's Profile:
    http://www.excelforum.com/member.php...o&userid=24345
    | View this thread: http://www.excelforum.com/showthread...hreadid=379455
    |



+ 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