+ Reply to Thread
Results 1 to 9 of 9

Macro to copy and paste values in a selected row

  1. #1
    Registered User
    Join Date
    02-24-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    6

    Question Macro to copy and paste values in a selected row

    I have a database of customer details and people can use a data form to browse through to look for ID numbers. You then click on another button that has the macro i have pasted beneath and you type in the ID and it finds and selects the row it is in, i then want to copy certain values in that row and paste on another sheet in specific cells and i need this to work each time the row is different, can anyone help please???

    Here is the macro


    Please Login or Register  to view this content.
    Last edited by marianov; 03-05-2012 at 05:34 PM.

  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: Macro to copy and paste values in a selected row

    Please edit your post to use code tags per the forum rules.

    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-24-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Macro to copy and paste values in a selected row

    I have changed it now

  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: Macro to copy and paste values in a selected row

    Thanks. If you can I think it would also help to see a workbook with a sample of your data and the result that you are expecting.

    Dom

  5. #5
    Registered User
    Join Date
    02-24-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Macro to copy and paste values in a selected row

    Here is a quick example that i made, similar to the original but with less macros and sheets. I have set up the macro i posted before on the button find values and i need the button that says copy values to copy the values in whichever the row is and paste them on sheet 2 in the corresponding cells that i have made. Ignore the prices its just the name and address, email and number i need. Thanks for the help in advance!!!
    Attached Files Attached Files

  6. #6
    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: Macro to copy and paste values in a selected row

    How about in one go?

    Please Login or Register  to view this content.
    Dom

  7. #7
    Registered User
    Join Date
    02-24-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Macro to copy and paste values in a selected row

    Man you are a true genius. you don't realise how long i have been stuck on this. Thanks very much for help dude!! better than i expected

  8. #8
    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: Macro to copy and paste values in a selected row

    Glad I could help . Please mark the thread solved if you are happy with the solution.

    Dom

  9. #9
    Registered User
    Join Date
    02-24-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Macro to copy and paste values in a selected row

    will do, thanks again!
    Last edited by marianov; 03-05-2012 at 05:28 PM.

+ 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