+ Reply to Thread
Results 1 to 17 of 17

Is there a simplified method for sorting extracted data??

  1. #1
    Registered User
    Join Date
    03-26-2013
    Location
    oregon
    MS-Off Ver
    Excel 2007
    Posts
    22

    Is there a simplified method for sorting extracted data??

    I apologize in advance if my title doesn't match what I am trying to accomplish. I am so close to perfecting (with the help of ChemistB & Dan_SJ) a schedule that will make things a lot easier for many. For the most part it works the way I want it to but it requires many help columns. I actually use a full help sheet for the sorting calculations on my Master Schedule workbook because it has a full week not just one day like my sample attached below. I am having a hard time explaining it on this post, but I did add text in my sample trying to explain. Please take a look and let me know if there might be a simplified method. Thank you!
    Attached Files Attached Files
    Last edited by new@excel; 04-27-2013 at 06:41 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Is there a simplified method for sorting extracted data??

    Hi

    I personally dont have a problem using helper columns, even if there are a lot of them. Looking atthose helpers, and their formulas, there is probably a way to condense them, but the resulting formula would be a night-mare to edit.

    It might be a bit easier to see your concern if you include more than just 1 day's worth of data?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Is there a simplified method for sorting extracted data??

    Hello,

    Here is a way, using Array formula. You don't have to use any helper column.

    Sorry for the mess on format, I was dragging the formula ...

    But as FDibbins said, there's nothing wrong with having extra helper columns (unless you have more than 10 of them).
    Attached Files Attached Files
    Last edited by Lemice; 04-27-2013 at 09:28 PM.
    (copy pasta from Ford)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools

    Regards,
    Lem

  4. #4
    Registered User
    Join Date
    03-26-2013
    Location
    oregon
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Is there a simplified method for sorting extracted data??

    Thank you both FDibbins and Lemice for your quick responce and time. FDibbins, I tried once before to attatch the whole workbook but I couldn't due to size. I might try again but I think we are very close to being solved. Lemice, again thanks for your time! Your AWESOME Array formula just about wraps up this episode. Only one minor detail, "duplicates" in your solution under both AM and PM concessions NAME 9 and NAME 14 appear twice, everything else works without a hitch. Is that possible to fix? Thanks again!

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Is there a simplified method for sorting extracted data??

    If Lemice is giving you what you need, great If not, I didnt mean for you to upload the whole file, just add maybe 1 more day of data?

  6. #6
    Registered User
    Join Date
    03-26-2013
    Location
    oregon
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Is there a simplified method for sorting extracted data??

    Thanks FDibbins,! I only attached one day of data because I figured the rest of the week would be pretty much exactly the same with the only changes being column references. But I will attach another sample with more data asap. Thanks again!
    Last edited by new@excel; 04-28-2013 at 02:06 AM.

  7. #7
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Is there a simplified method for sorting extracted data??

    Here is the sample file with the fixed formula.

    The good news is that, duplicated data is no longer a problem. However, there's a bad news too - now it's a ... mess, it doesn't sort by time / name / shift anymore, it will just grab whatever name come up first from the top to the bottom of the list on your first worksheet.

    I actually tried to edit my own formula and gave up at first (lol), then I decided to take out the sorting part of it, and here we go.

    So, yeah, it won't look as elegant as when it's sorted, but now you don't have to worry about false data!
    Attached Files Attached Files
    Last edited by Lemice; 04-28-2013 at 03:19 AM.

  8. #8
    Registered User
    Join Date
    03-26-2013
    Location
    oregon
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Is there a simplified method for sorting extracted data??

    Thanks Lemice! I am wondering if a simple match or lookup function just for the staff member/name cells. Does that make sence and will it work? I am working on it now.

  9. #9
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Is there a simplified method for sorting extracted data??

    Yes it make sense, because the name is unique in the sample, so you can actually just do a simple index match / vlookup base on the name to get other data.
    Last edited by Lemice; 04-28-2013 at 03:20 AM.

  10. #10
    Registered User
    Join Date
    03-26-2013
    Location
    oregon
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Is there a simplified method for sorting extracted data??

    Oooops! Sorry Lemice I just noticed how much of a mess you meant. For some reason I was thinking only the names were not sorted and thought could use lookup/match to extract just the name matching the shift and hours. Maybe just one helper column to manipulate the row values and use as the small(reference) in your original sample?? I am still tinkering with it though. I have a hard time coming up with the proper formulas but I am able to modify them.

  11. #11
    Registered User
    Join Date
    03-26-2013
    Location
    oregon
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Is there a simplified method for sorting extracted data??

    Hey FDibbins, here is another copy of my sample with the added days (Saturday and Sunday). Unfortunately I didn't change the references/ranges int the formulas on the daily shift sheets because the results would have been just the same and I was trying to post this asap. Thanks again FDibbins!
    Attached Files Attached Files
    Last edited by new@excel; 04-28-2013 at 03:58 AM.

  12. #12
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Is there a simplified method for sorting extracted data??

    I was really uncomfortable with the failure to sort value, so here is another shot at it.

    In the attached file, you will see no helper column (because they are not needed), duplicated data being handled, and the data being sorted by the Shift column.

    However, I still cannot deal with sorting Staff name / member when Shift time is equal, so if there are Staff / Member having the same shift, whoever nearer to the top of the list will be grabbed first. I will try to handle that also if I can tomorrow.
    Attached Files Attached Files
    Last edited by Lemice; 04-28-2013 at 04:15 AM.

  13. #13
    Registered User
    Join Date
    03-26-2013
    Location
    oregon
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Is there a simplified method for sorting extracted data??

    Thank you very much Lemice for your much appreciated time and effort!!!! I don't think that will be necessary sorting the staff names as long as the names match the shifts and positions. So if there are multiple employees starting at the same time in the same position it won't matter who's name is first. But thanks anyways. I am gonna go ahead and mark this solved. I am really grateful for people like you Lemice, FDibbins, ChemistB, Dan_SJ and SixthSence who all make time to help others and to have a site like this to do so. I can't thank you all enough, but Thank you!!!!
    Last edited by new@excel; 04-28-2013 at 04:40 AM.

  14. #14
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Is there a simplified method for sorting extracted data??

    I still am not happy with the results though, I still want them to at least sort by the name column also ...

    But at first I want to make sure that it's working at least. Let me know if there's something wrong with it.

  15. #15
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Is there a simplified method for sorting extracted data??

    Finally, here is a version where it's sorted automatically when the data is being pulled in, sort by Shift time first, then by Name

    In the sample, you will see Name 10 stands before Name 9, here is why
    With real name, for example Iron Man and Iron N, of course Iron Man will be chosen to stand before Iron N, because everything up to "Iron " is the same, but "M" stands before "N" alphabetically, similarly "1" stands before "9", making Name 10 stand before Name 9.

    I'm very confident with this version, however considering the time I am posting this is nearly 2am Sunday morning, I won't say there is absolutely no flaw in it. But finding that flaw will be hard, I ensure you!

    Edit: Talking about flaw, I forgot to change the formula in "hrs" column accordingly ...
    I have changed the file.
    Attached Files Attached Files
    Last edited by Lemice; 04-28-2013 at 05:07 AM.

  16. #16
    Registered User
    Join Date
    03-26-2013
    Location
    oregon
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Is there a simplified method for sorting extracted data??

    Hey Lemice, all I can say is wow!!!!! Everything seems to be working to perfection so far as I knew it would. I will let you know if I run into any problems and I will try to share the final result as soon as I am done editing. Seriously! Thank You!

  17. #17
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Is there a simplified method for sorting extracted data??

    Glad that I could help you.

    And also, thank you for the feedback!

    Have a great day!

+ 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