+ Reply to Thread
Results 1 to 12 of 12

Transferring Data/Auto Sort

  1. #1
    Registered User
    Join Date
    06-01-2007
    Location
    Mesa, AZ
    Posts
    8

    Transferring Data/Auto Sort

    I am trying to combine rows of data, each 4 cells long from multiple worksheets into one master sheet. I need to know if there is an easy way to do this and also I would like to setup an Auto Sort if possible to automatically sort the rows by date.

    The data that will be transferred is: Date, Amount, Description, and Company Billed. I have my workbook organized by a Vendor per worksheet and would like to have the data I enter inside the vendor worksheet to automatically transfer to the master sheet and sort by date. Does that make sense?

  2. #2
    Forum Contributor
    Join Date
    10-14-2004
    Location
    San Diego, CA
    Posts
    213
    Hello SilkyJohnson:

    It sounds simple enough, if you could post a sample .zip file I'm sure you would get a better response.

    Matt

  3. #3
    Registered User
    Join Date
    06-01-2007
    Location
    Mesa, AZ
    Posts
    8
    Here you go, this is an example of what I have...I have more worksheets in the original. I want to be able to enter info in the Bulbs.com worksheet and have it automatically update the master sheet with that entry and then sort all the data by date.

    I would like for it to transfer all entries from each of my worksheets into the master sheet and then sort by date. Can anyone help with this?

    Thanks.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    06-01-2007
    Location
    Mesa, AZ
    Posts
    8
    Here is a better example, with more data to work with.
    Attached Files Attached Files

  5. #5
    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
    This might get you started

    The main code is from this website

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

    VBA Noob
    Attached Files Attached Files
    _________________________________________


    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 !!!

  6. #6
    Registered User
    Join Date
    06-01-2007
    Location
    Mesa, AZ
    Posts
    8
    Thanks!! That's exactly what I was looking for, plus a cool button! Now I just need to modify the code for my original and I should be good.

    Thanks again.

  7. #7
    Registered User
    Join Date
    06-01-2007
    Location
    Mesa, AZ
    Posts
    8
    I'm not sure why but when I use that same code you have, the output of "Master AMEX Sheet" transfers the column names and one row of data is showing up twice. I even added columns to the workbook that you uploaded for me and everything works fine...but that same code gives me different results. Any idea as to why it would be doing that?

  8. #8
    Registered User
    Join Date
    06-01-2007
    Location
    Mesa, AZ
    Posts
    8
    Okay, I found the reason for the duplicates...it was a duplicate listing of data on 2 different worksheets. But what about the column names any suggestions?

  9. #9
    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
    Read the link and it will help

    If you are not starting from A1 then that may be the issue.

    Maybe try removing the below code.

    I hard coded the headers

    Please Login or Register  to view this content.
    VBA Noob

  10. #10
    Registered User
    Join Date
    06-01-2007
    Location
    Mesa, AZ
    Posts
    8
    I deleted that line of code and it is doing the same thing only now it obviously doesn't display those headers. For some reason it copies over the heading from worksheets that do not have any data in them, only headers. Not sure why but, I'll take a look at that link again and see if I can't figure it out. Thanks for the help.

  11. #11
    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
    If you still have a problem post a sample of your file.

    VBA Noob

  12. #12
    Registered User
    Join Date
    06-01-2007
    Location
    Mesa, AZ
    Posts
    8
    Everything works out fine except for transferring of the heading of worksheets that don't have any date besides the heading themselves. I believe an IF/ELSE statement could fix this but do not know enough about VBA to implement it into the macro. Something like:

    IF (Row 2 is empty)
    Do not transfer data from this worksheet
    ELSE
    Transfer Data and move on to next row

    I'm not a programmer or even close, but I do understand the logic somewhat...

    Here is a sample of 3 of the worksheets I am using, 2 of them have just the headers in them and data. The other one has the header plus a row of data.

    Also, is there any way to add formatting to the code below? I would like to make the heading Bold and add an Outline and Inside Border to all cells with headings?

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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