+ Reply to Thread
Results 1 to 10 of 10

data copying between sheets

  1. #1
    Registered User
    Join Date
    10-14-2008
    Location
    dunedin nz
    Posts
    6

    data copying between sheets

    Hi guys, trying to copy some data in a spreadsheet ive made, and add some data automatically. shouldnt be too hard but not quite got my head around it.

    Basically i have 2 columns of data in multiple worksheets which i wish to copy into one column on another sheet.

    Ideally i want to be able to click a button and have all the data compile with the item number and serial number into sheet "compile" no matter how many sheets i have (my current macro copys the sheets with a sheet prefix onto it, ive left 31 and 32 there) automatically. Ive edited compile with one sheet of data (note i just copied 31 to 32 - normally all data would be different, not a straight copy) to show what i am trying to achieve. the 17000 will stay the same no matter what, so i just used an IF function there. Basically the part im having issues understanding is how to copy data to the next blank space in the work book, as it wont always be full of data.

    At the end of getting this part working i will set it up to automatically compile into a seperate work book as a csv comma delimited to upload to a database for stocktaking purposes - but i just want to get the basic copying working first.

    thanks guys
    Attached Files Attached Files
    Last edited by rylo; 10-15-2008 at 12:37 AM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Try this

    Please Login or Register  to view this content.
    rylo

  3. #3
    Registered User
    Join Date
    10-14-2008
    Location
    dunedin nz
    Posts
    6
    you. are. the. man.

    Thanks so much, im 110% sure i wouldnt have gotten that!!! thanks!!!!!!

  4. #4
    Registered User
    Join Date
    10-14-2008
    Location
    dunedin nz
    Posts
    6
    actually, i spoke too soon - im having some issues (probably because i dont fully understand what you've done rylo) - id like to be able to add data at a later date as well, and run the macro again, and have it update the compile sheet - is this possible? at present if i enter data in say, cell d11 on sheet A14, it isnt coming up in the compile list after re-running the macro - even if i delete all data. However, if i move it to D12, it will work. Thanks!

  5. #5
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Interesting. Do you have data in D8:D10? It works on the principle that data will start in D8 and move down the column. It will move down until it meets the first blank cell.

    Can you update your example file to represent your problem. So if you put something in D11 it doesn't work, but it does for D12.


    rylo

  6. #6
    Registered User
    Join Date
    10-14-2008
    Location
    dunedin nz
    Posts
    6
    sorry, i meant B12, not D12. Im currently away from my main pc, but will upload my example tomorrow. Thanks for all your help

  7. #7
    Registered User
    Join Date
    10-14-2008
    Location
    dunedin nz
    Posts
    6
    Hi Guys (Rylo!)

    Attached is a copy of what im having issues with - for some reason its doubled up a serial number etc.
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    HI

    Forgot to change one of the references for the second column. Try this

    Please Login or Register  to view this content.
    rylo

  9. #9
    Registered User
    Join Date
    10-14-2008
    Location
    dunedin nz
    Posts
    6
    brilliant, working fine - there is for some reason some erroneous zero rows popping up, but i just made a rule that deletes them with a macro, so everything is working great ! thanks very much!!!

  10. #10
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    For the error rows, just check that the source data doesn't have a space instead of a blank. If that isn't it, does it appear when running against the example file that you attached?

    rylo

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copying data between sheets & add timestamp
    By rxwillow in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-25-2008, 05:54 PM
  2. copying data between sheets
    By davetherave in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-05-2007, 07:03 PM
  3. Cross post >> Copying data from one workbook to another
    By howard101 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-01-2007, 06:58 AM
  4. Filter data to other sheets
    By pauliano in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-27-2006, 04:51 AM
  5. Copying Filtered Data
    By kmrkmj in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 11-23-2006, 08:26 AM

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