+ Reply to Thread
Results 1 to 5 of 5

Copying Multiple Cells in VB

  1. #1
    Registered User
    Join Date
    02-12-2010
    Location
    Milton Keynes
    MS-Off Ver
    Excel 2003
    Posts
    5

    Copying Multiple Cells in VB

    Hi

    The basic on what i want to be able to do if possible is:

    If 2 or more cells are selected (below one another) and i press run, then Copy the info in the top cell to 1 sheet, and copy the info in the 2nd cell, into a 2nd sheet.

    I also need to make sure that if only 1 cell is selected, that it only copies the info from that single cell.

    Is this possible? Any advise would be great

    Cheers

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Copying Multiple Cells in VB

    Maybe:

    Please Login or Register  to view this content.

    If 1 cell is selected then the cell will just be copied to Sheet2, if 2 then they will be copied to Sheet2 and Sheet3.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    02-12-2010
    Location
    Milton Keynes
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Copying Multiple Cells in VB

    Thanks for that Dom, but its not quite what i was after.

    Its still better than anything i've come up with so far....

    At the minute, If 2 cells selected it copies the same the same value to sheet 2 and sheet 3.
    Ideally i need it to copy the 1st cell value into sheet 2 and the 2nd cell value into sheet 3

  4. #4
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Copying Multiple Cells in VB

    Aye, it wasn't quite right. Try:

    Please Login or Register  to view this content.
    Dom

  5. #5
    Registered User
    Join Date
    02-12-2010
    Location
    Milton Keynes
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Copying Multiple Cells in VB

    Thats spot on!

    Cheers for your help Dom

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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