+ Reply to Thread
Results 1 to 18 of 18

Excel Dates m-dd-yyyy OR mm-dd-yyyy

  1. #1
    Registered User
    Join Date
    06-16-2014
    Location
    United States
    MS-Off Ver
    2013
    Posts
    72

    Exclamation Excel Dates m-dd-yyyy OR mm-dd-yyyy

    I have one overview sheet and multiple worksheets with data on them. Right now I am using =SUMPRODUCT(N(INDIRECT("'"&TEXT(N19+(ROW(INDIRECT("1:"&1+N21-N19))-1),"mm-dd-yyyy")&"'!C5"))) as a lookup feature to look through the worksheets using the mm-dd-yyyy tab name. Is there anyway to switch that forumla so it includes either mm-dd-yyyy date tab names AND m-dd-yyyy formated tab names.........Any help would be appreciated.

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

    Re: Excel Dates m-dd-yyyy OR mm-dd-yyyy

    Have you tried just "m-dd-yyyy"
    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
    Registered User
    Join Date
    06-16-2014
    Location
    United States
    MS-Off Ver
    2013
    Posts
    72

    Re: Excel Dates m-dd-yyyy OR mm-dd-yyyy

    Yes....But I want the tabs to be either mm-dd-yyyy AND m-dd-yyyy and both work...

  4. #4
    Registered User
    Join Date
    06-16-2014
    Location
    United States
    MS-Off Ver
    2013
    Posts
    72

    Re: Excel Dates m-dd-yyyy OR mm-dd-yyyy

    How could the forumla say look for mm-dd-yyyy AND m-dd-yyyy?

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Excel Dates m-dd-yyyy OR mm-dd-yyyy

    I thought you said you would have no problem changing them all to a single format?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  6. #6
    Registered User
    Join Date
    06-16-2014
    Location
    United States
    MS-Off Ver
    2013
    Posts
    72

    Re: Excel Dates m-dd-yyyy OR mm-dd-yyyy

    I'm working with people who keep changing from mm-dd-yyyy and m-dd-yyyy....I was wondering if there was a way for it to recognize either formats....

  7. #7
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Excel Dates m-dd-yyyy OR mm-dd-yyyy

    I'll tell you what: if you post a small workbook with an example and your expected result clearly outlined then I'll see what I can do.

    Otherwise I'd need to mock-up an entire workbook myself just to test potential solutions and I'm afraid I'm not prepared to do that right now (I did last time round but didn't save it).

    Regards

  8. #8
    Registered User
    Join Date
    06-16-2014
    Location
    United States
    MS-Off Ver
    2013
    Posts
    72

    Re: Excel Dates m-dd-yyyy OR mm-dd-yyyy

    Here is a screen capture with what I want. Thanks for any help XOR. you are a god in this excel forum. Capture.PNG

  9. #9
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Excel Dates m-dd-yyyy OR mm-dd-yyyy

    Sorry - I meant an actual workbook. I'd still have to re-type everything from your screenshot into Excel in order to test potential solutions.

    Regards

  10. #10
    Registered User
    Join Date
    06-16-2014
    Location
    United States
    MS-Off Ver
    2013
    Posts
    72

    Re: Excel Dates m-dd-yyyy OR mm-dd-yyyy

    How do you post a workbook. All I see is options for an image?

  11. #11
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Excel Dates m-dd-yyyy OR mm-dd-yyyy

    Click on Go Advanced and scroll down to Manage Attachments.

    Regards

  12. #12
    Registered User
    Join Date
    06-16-2014
    Location
    United States
    MS-Off Ver
    2013
    Posts
    72

    Re: Excel Dates m-dd-yyyy OR mm-dd-yyyy

    Book1.xlsx Here is my workbook

  13. #13
    Registered User
    Join Date
    06-16-2014
    Location
    United States
    MS-Off Ver
    2013
    Posts
    72

    Re: Excel Dates m-dd-yyyy OR mm-dd-yyyy

    Thanks for your patients XOR.

  14. #14
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Excel Dates m-dd-yyyy OR mm-dd-yyyy

    Quote Originally Posted by flextera View Post
    Thanks for your patients XOR.
    You're welcome, but not sure I understand. Did you post the correct attachment?

    I mean - there's nothing in C2 or C4 and, more importantly, your tab names are in all the exact same format in this book, i.e. xx-xx-xxxx. I thought you said you had a mixture?

    Also, you haven't included your expected result for the formula, so I don't know what I'm aiming for.

    I'm afraid I'm going to have to ask you to re-attach.

    Regards

  15. #15
    Registered User
    Join Date
    06-16-2014
    Location
    United States
    MS-Off Ver
    2013
    Posts
    72

    Re: Excel Dates m-dd-yyyy OR mm-dd-yyyy

    Book1.xlsx Hopefully this makes more sense. Right now....the only way to calculate a total for cell G2 in all the worksheets is if I have 04-27-2014....I want to be able to name my wroksheets either 04-27-2014 OR 4-27-2014.

  16. #16
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Excel Dates m-dd-yyyy OR mm-dd-yyyy

    You'll have to switch to an array formula**:

    =SUM(IFERROR(N(INDIRECT("'"&TEXT(C2+(ROW(INDIRECT("1:"&1+C4-C2))-1),{"m",""}&"m-dd-yyyy")&"'!G2")),0))

    By the way, in the workbook you posted the date in C2 (27th April) was the same as the name of that tab, so you had a circular reference, which you can't allow.

    Regards


    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).

  17. #17
    Registered User
    Join Date
    06-16-2014
    Location
    United States
    MS-Off Ver
    2013
    Posts
    72

    Re: Excel Dates m-dd-yyyy OR mm-dd-yyyy

    Thanks a million XOR. You never cease to amaze.

  18. #18
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Excel Dates m-dd-yyyy OR mm-dd-yyyy

    You're welcome again!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA incorrectly changing some dates from DD/MM/YYYY to YYYY-DD-MM
    By DaveBre in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-07-2014, 07:23 PM
  2. [SOLVED] Converting dates from dd/mm/yyyy to mm/dd/yyyy
    By treeantz in forum Excel General
    Replies: 6
    Last Post: 01-04-2013, 03:34 AM
  3. Replies: 0
    Last Post: 10-14-2012, 05:48 PM
  4. Copy+Paste macro dd/mm/yyyy to dd/mm/yyyy and NOT dd/mm/yyyy to mm/dd/yyyy
    By uimhirADo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-08-2012, 03:45 AM
  5. Macro to convert dates format from yyyy mm dd to yyyy-mm-dd
    By Gators in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 02-26-2009, 02:23 PM

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