+ Reply to Thread
Results 1 to 9 of 9

how to return day of week

  1. #1
    Registered User
    Join Date
    10-29-2012
    Location
    Tulsa, Oklahoma
    MS-Off Ver
    Excel 2007
    Posts
    3

    how to return day of week

    Ok, so I'm using excel to figure out a Best Day in which I'm trying to figure out how to take two different sets of data for the same day, number of wins and losses for the day. I want it to work as follows: Take Monday's wins and subtract it's losses from it, then do the same for each other day, then take the highest number here and return the name of the day, not the number it calculates. I'm kind of lost on how to do this exactly.

    An attachment of the actual worksheet I'm working on is included.web attachment.xlsx
    Last edited by agen; 10-29-2012 at 03:20 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,936

    Re: Need some help

    we would love to help you. however.

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    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
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: how to return day of week

    I added helper cells in D19:H19 with the formula: =D4-D12 (changing 'D' for each column E, F, G and H)

    Then in B19, I used: =INDEX(D11:H11,1,MATCH(MAX(D19:H19),D19:H19,0))

    If there is a tie (for example: if Tuesday and Friday were equal) only the first day (Tuesday) would be returned

    - Moo

  4. #4
    Registered User
    Join Date
    10-29-2012
    Location
    Tulsa, Oklahoma
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: how to return day of week

    I appreciate the help Moo, but I'm not wanting to add in helper cells because of visual preferences. There must be a way to accomplish what I want without them, right?

  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,936

    Re: how to return day of week

    you can always hide a helper column, or put it so far off to the side that no1 will see it?

  6. #6
    Registered User
    Join Date
    10-29-2012
    Location
    Tulsa, Oklahoma
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: how to return day of week

    Er....you are correct FDibbins, I can do that. Thanks a lot.

  7. #7
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: how to return day of week

    Glad to help, agen.

    - moo

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: how to return day of week

    You can lose the helper cells if you use an array version of Moo's INDEX/MATCH formula like this

    =INDEX(D11:H11,MATCH(MAX(D4:H4-D12:H12),D4:H4-D12:H12,0))

    confirmed with CTRL+SHIFT+ENTER
    Audere est facere

  9. #9
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: how to return day of week

    Quote Originally Posted by daddylonglegs View Post
    You can lose the helper cells if you use an array version of Moo's INDEX/MATCH formula like this

    =INDEX(D11:H11,MATCH(MAX(D4:H4-D12:H12),D4:H4-D12:H12,0))

    confirmed with CTRL+SHIFT+ENTER
    Thanks, DLL. I knew there was a way to do that, for some reason I just couldn't wrap my head around it.

    - Moo

+ 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