+ Reply to Thread
Results 1 to 16 of 16

Grab only necessary data make new sheet

  1. #1
    Registered User
    Join Date
    05-12-2010
    Location
    Adrian, MI
    MS-Off Ver
    Excel 2010
    Posts
    76

    Grab only necessary data make new sheet

    I have attached an example of what i am trying to accomplish. I have data that i have used formulas to grab. But it is all over the place and some are not even in the right columns etc. Sheet 1 describes how my formulas position the data i get. Sheet 4 is how i want it to look. So i am not sure if i can get a macro that puts all the data on another sheet or what? Any ideas would be great. Also i want it to add some information (see column g on sheet 4)

    Oh and only the highlighted data is what i need, i do not need the other stuff. Basically just time periods that have a start date and time and end time.

    Thank you in advance.
    Attached Files Attached Files
    Last edited by aehartle; 07-02-2010 at 04:04 PM.

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Grab only necessary data make new sheet

    Try this
    Please Login or Register  to view this content.

    It's a bit of a guess, but the best I can do with the sample.
    N.B. it adds a day to the date where required

    Hope this helps

    [EDIT]

    Just noticed I had overwritten the BU sheet in the sample sheet.
    Attached Files Attached Files
    Last edited by Marcol; 06-28-2010 at 02:47 PM. Reason: Workbook replaced
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Grab only necessary data make new sheet

    cant see anything in terms of functions on sheet1! what did you use?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    05-12-2010
    Location
    Adrian, MI
    MS-Off Ver
    Excel 2010
    Posts
    76

    Re: Grab only necessary data make new sheet

    My functions are not in sheet 1 as it would come up as Ref's so it is hard data. I tried the vba code...works kind of...i have multiple employees in the same sheet. The vba provided smashes them all as one employee.. Great start and works how i want it to..just need it to separate out the employees too.

    Thanks for helping...it currently takes FOREVER to sort now.

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Grab only necessary data make new sheet

    A bit of guesswork!

    I assumed to be valid data each row should have three values.

    Start date, Start time, Finish time

    If the finish time is PM then the missing column Finish Date = Start Date
    If the finish time is AM then the missing column Finish Date = Start Date + 1

    I also assumed there was only one employee involved.

  6. #6
    Registered User
    Join Date
    05-12-2010
    Location
    Adrian, MI
    MS-Off Ver
    Excel 2010
    Posts
    76

    Re: Grab only necessary data make new sheet

    any luck with the new info macrol? I really appreciate it.

  7. #7
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Grab only necessary data make new sheet

    Try this
    Please Login or Register  to view this content.

    Is that any better?
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    05-12-2010
    Location
    Adrian, MI
    MS-Off Ver
    Excel 2010
    Posts
    76

    Re: Grab only necessary data make new sheet

    I regret to inform you that it didn't work. The previous worked better it just didn't have the employee name inbetween the times.

  9. #9
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Grab only necessary data make new sheet

    Have you down-loaded and tried the workbooks I posted, or just tried the code on a sheet of yours?

  10. #10
    Registered User
    Join Date
    05-12-2010
    Location
    Adrian, MI
    MS-Off Ver
    Excel 2010
    Posts
    76

    Re: Grab only necessary data make new sheet

    just the code in my sheets, i'll try the book

  11. #11
    Registered User
    Join Date
    05-12-2010
    Location
    Adrian, MI
    MS-Off Ver
    Excel 2010
    Posts
    76

    Re: Grab only necessary data make new sheet

    I tried your workbook but it still only has one person in there.

  12. #12
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Grab only necessary data make new sheet

    I tried your workbook but it still only has one person in there.
    As does your posted workbook ..

    You apparently have two in number employees.
    One called "Position", the other "Cashier N-4", both have the same ID "40002", or am I wrong?

    The first solution offered matched your requested table on Sheet "Sheet4" as far as was possible, note that there was no "split" in this requested table.

    The second used the only option that was left "split" on the aforesaid "Position", and "Cashier N-4"

    There are many clever people answering obsure questions on this forum, but as far as I am aware none of them have crystal balls.

    In the upper regions of my failing frame, I have two standard Mk1 eyeballs, they are, I regret to inform you, unable to glean any more from your brief.
    Perhaps the others I possess would do better if they were younger and fitter.

    Fix your problem at source!
    Last edited by Marcol; 06-28-2010 at 08:14 PM.

  13. #13
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Grab only necessary data make new sheet

    if you could just give original and desired results . then maybe functions can do it. vba certainly will given the correct info but no one knows exactly what you want( my crystal ball is at the opticians being re-ground as vari-focal )
    Last edited by martindwilson; 06-28-2010 at 08:21 PM.

  14. #14
    Registered User
    Join Date
    05-12-2010
    Location
    Adrian, MI
    MS-Off Ver
    Excel 2010
    Posts
    76

    Re: Grab only necessary data make new sheet

    Here is my example with 2 people. Sheet 1 is orignal data and sheet 4 is how i want it to look.
    Attached Files Attached Files

  15. #15
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Grab only necessary data make new sheet

    Okay here's another attempt.
    Please Login or Register  to view this content.

    Let me know how this one goes.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    05-12-2010
    Location
    Adrian, MI
    MS-Off Ver
    Excel 2010
    Posts
    76

    Re: Grab only necessary data make new sheet

    Not sure but i think you solved it... It works excellent from what i can see

+ 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