+ Reply to Thread
Results 1 to 5 of 5

macro to copy and paste data

  1. #1
    Forum Contributor
    Join Date
    02-20-2007
    MS-Off Ver
    2003 & 2007
    Posts
    299

    macro to copy and paste data

    I need to copy cells in A and paste it into sheet "Upload" in col A from the last used row down. However, I only need to copy the cells that begin with a 6 digit number. I also need to take E and copy to C on upload sheet.
    For example: if A2 = "total revenue" then do nothing, if A3 = "163001.419"
    Then copy It to A in upload and copy E to C in upload.
    1 more thing...I need B in upload to =the sheet name that A and C came from plus the following text "Undistributed Stores Exp".
    Is this possible? Would be a huge time saver.
    thank you.

    I can post a sample workbook if need be.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    erock24,

    It seems to me you have no intention of trying to learn VBA yourself as you get this forum and MrExcel to do it all for you.

    So instead of doing your job for you and not getting your pay I think it's about time you did some work

    See link to extract data

    http://www.rondebruin.nl/copy5.htm

    You need to use a line such as for your criteria

    Please Login or Register  to view this content.
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Contributor
    Join Date
    02-20-2007
    MS-Off Ver
    2003 & 2007
    Posts
    299
    That's a wonderful site...thank you for the link.
    It's unfortunate I come accross that way. It's not my intention. I feel bad. My questions are normally apart of a much bigger picture.

    Is there a way to get all the results for this, but to exclude any that contain a "-"
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try turning on the VBA recorder. Will give code like

    Please Login or Register  to view this content.
    VBA Noob

  5. #5
    Forum Contributor
    Join Date
    02-20-2007
    MS-Off Ver
    2003 & 2007
    Posts
    299
    With the help of Ron de Bruins site, VBA Noob, and the macro recorder, I completed this macro. It works perfect. It's long because it repeats for each sheet. I couldn't figure out how to set WS1 to the activesheet and have the macro cycle through my sheets activating them so as to only have on code that runs for everysheet. But it works.
    Please Login or Register  to view this content.

+ 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