+ Reply to Thread
Results 1 to 8 of 8

Excel 2013 issue with text formatting

  1. #1
    Registered User
    Join Date
    06-21-2012
    Location
    Netherlands
    MS-Off Ver
    2016 (64-bit)
    Posts
    46

    Excel 2013 issue with text formatting

    Hi, I'm running into an issue with Excel 2013.

    I'm using the follwing formula.
    =TEXT(CONCATENATE(INT((A$3-DATE(YEAR(A$3-WEEKDAY(A$3-1)+4),1,3)+WEEKDAY(DATE(YEAR(A$3-WEEKDAY(A$3-1)+4),1,3))+5)/7),"-",A1),"mm-jjjj")

    In Excel 2010 this works perfectly. However when I open the file in 2013 it will display as 41-JJJJ. JJJJ should print the year. Changing this to YYYY doesn't work. If I open the file in 2010 after opening it in 2013 it will give the same problem in 2010. This can be fixed by selecting the formula and hitting enter.
    In 2013 I can't get it to work at all. It seems 2013 uses the regional setting differently. I'm using 2013 in a citrix enverinment, i'm not sure what it uses as regional setting.

    Does anyone have a workaround that works in all versions of excel?

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Excel 2013 issue with text formatting

    As you are concatenating some values, that will result in a text value - you need to convert that into a numeric value in order for the TEXT function to work. Can you explain what is in the various cells used in the formula (A1, A3) and what the CONCATENATE part actually produces?

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    06-21-2012
    Location
    Netherlands
    MS-Off Ver
    2016 (64-bit)
    Posts
    46

    Re: Excel 2013 issue with text formatting

    Row A1 contains the year (2012). A3 contains the date (8-okt-2012). It should produce a weeknumber 41-2012.

    It functions fine in excel 2010. It's only in Excel 2013 where it doesn't work.

  4. #4
    Registered User
    Join Date
    06-21-2012
    Location
    Netherlands
    MS-Off Ver
    2016 (64-bit)
    Posts
    46

    Re: Excel 2013 issue with text formatting

    Repeating the excercise to change jjjj to yyyy, seems to work this time.

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Excel 2013 issue with text formatting

    I don't think you need that TEXT function, then - try it without it, like this:

    =CONCATENATE(INT((A$3-DATE(YEAR(A$3-WEEKDAY(A$3-1)+4),1,3)+WEEKDAY(DATE(YEAR(A$3-WEEKDAY(A$3-1)+4),1,3))+5)/7),"-",A1)

    Hope this helps.

    Pete

  6. #6
    Registered User
    Join Date
    06-21-2012
    Location
    Netherlands
    MS-Off Ver
    2016 (64-bit)
    Posts
    46

    Re: Excel 2013 issue with text formatting

    Thanks!

    That doesn't work for me though because I need it to print 01-2013 instead of 1-2013. That's why i added the text() function.

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Excel 2013 issue with text formatting

    In that case you can do this:

    =TEXT(INT((A$3-DATE(YEAR(A$3-WEEKDAY(A$3-1)+4),1,3)+WEEKDAY(DATE(YEAR(A$3-WEEKDAY(A$3-1)+4),1,3))+5)/7),"00")&"-"&A1

    Hope this helps.

    Pete

  8. #8
    Registered User
    Join Date
    06-21-2012
    Location
    Netherlands
    MS-Off Ver
    2016 (64-bit)
    Posts
    46

    Re: Excel 2013 issue with text formatting

    Thanks! That works even better

+ 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. Simple formula to display a date (10/19/2013) as text (October 2013)
    By benyben123 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-20-2013, 03:47 AM
  2. Compatibility issue with Excel 2013
    By kinokino in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 09-02-2013, 04:17 AM
  3. Excel 2013 issue generating report
    By mwittman in forum Excel General
    Replies: 0
    Last Post: 08-08-2013, 05:11 PM
  4. Macro issue may have when upgrade excel from 2003 to 2013
    By lhollis in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-30-2013, 03:21 AM
  5. Replies: 1
    Last Post: 05-19-2010, 07:20 AM

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