+ Reply to Thread
Results 1 to 12 of 12

Need Macro that arranges data from one sheet onto other sheets based on criteria

  1. #1
    Registered User
    Join Date
    07-06-2013
    Location
    Xenia, OH
    MS-Off Ver
    Excel 2010
    Posts
    8

    Need Macro that arranges data from one sheet onto other sheets based on criteria

    I need either a macro or a formula (preferably a macro button) that will take the information on the data sheet and organize it onto the destination sheets (sheets2,3,4,5). I want it to check if the data says "prepare",if it is true to than I want it to sheck if the date is equal to or less than 4 days from the date in cell B3 on the destination worksheets if it is copy the data from the matching row cells 1,2,3,4 and paste it on the table starting with cells A6:D6 on the sheet that matches the desk# in cell B3 on the destination worksheets. If not I want it to check for any other data that has a date matching exactly the date and then copy and paste that info as well. PROJECT1.xlsx

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Need Macro that arranges data from one sheet onto other sheets based on criteria

    Your post is rather confusing. Try this:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-06-2013
    Location
    Xenia, OH
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Need Macro that arranges data from one sheet onto other sheets based on criteria

    Yes this works for prepare and gives me those values if the value equals prepare and the date is within 4 days of the date... This is great that works. Now where I may have been confusing you is I now need it to return the same type of info on any other type of cell that has the SAME date. So, in essence I'm looking for accounts to prepare to show on the sheet 4 days prior to the date given every thing else i want it to show on the exact date given. Sorry if my explanation is confusing I just dont know how else to explain it... But part 1 works to a tee it's just now I need to return the values for everything other than "prepare"

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Need Macro that arranges data from one sheet onto other sheets based on criteria

    How would that work? On your example workbook all the destination sheets have the same date?

  5. #5
    Registered User
    Join Date
    07-06-2013
    Location
    Xenia, OH
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Need Macro that arranges data from one sheet onto other sheets based on criteria

    all the destination sheets will have the same date... it's the date on the original data page that has the differing dates. So anytime anything on that sheet matches the date on the destination sheet it puts it on the correct sheets table...

  6. #6
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Need Macro that arranges data from one sheet onto other sheets based on criteria

    So 1 row on the data sheet may go on all 4 of the others? Even if it says Submit or Delete in column D. Example; Row 25 would be copied to all the other sheets.

  7. #7
    Registered User
    Join Date
    07-06-2013
    Location
    Xenia, OH
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Need Macro that arranges data from one sheet onto other sheets based on criteria

    No, row 25 would go on sheet SHH bc the date matches exactly. they still need arranged by desk# it is just that ones marked as "prepare" need to show up on earlier dates, which is the part that is working great it is the "row 25" example that is not showing up

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Need Macro that arranges data from one sheet onto other sheets based on criteria

    Here's my interpretation.
    Please Login or Register  to view this content.
    [Edit: typo]
    Was
    Please Login or Register  to view this content.
    Now
    Please Login or Register  to view this content.
    Last edited by jindon; 07-07-2013 at 12:44 AM. Reason: Fixed typo

  9. #9
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Need Macro that arranges data from one sheet onto other sheets based on criteria

    Try this:

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    07-06-2013
    Location
    Xenia, OH
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Need Macro that arranges data from one sheet onto other sheets based on criteria

    Yes!!!! Thank you this works to a tee!!

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Need Macro that arranges data from one sheet onto other sheets based on criteria

    You are welcome and thanks for the rep.

    I have just fixed the typo, so copy the code again....

  12. #12
    Registered User
    Join Date
    07-06-2013
    Location
    Xenia, OH
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Need Macro that arranges data from one sheet onto other sheets based on criteria

    Okay, it was working and somehow I broke it by changing things... However, it was working fine and then it stopped somehow. I made it to where I am pulling my individual sheet data from a primary table so that changes to # can be made quickly if need be. I am getting an error13 and it highlights the problem code. I'm sure this is probably an easy fix PROJECT2.xlsm

+ 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