+ Reply to Thread
Results 1 to 9 of 9

dates appearing as generic code when mixed with text in a formula

  1. #1
    Registered User
    Join Date
    04-28-2016
    Location
    Manchester, England
    MS-Off Ver
    Office 365
    Posts
    13

    dates appearing as generic code when mixed with text in a formula

    I have entered the below formula
    ="Complaints Imported between "&SMALL('Data Import'!J:J,1)&" - "&MAX('Data Import'!J:J)

    and the small and max functions are bringing dates into the text in the cell. however the dates are appearing just as generic code rather than actual dates in the format I would like such as dd/mm/yyyy.

    I have tried adding the text formula around the small and max functions but it is not working. any ideas?

    so column J contains dates and I wan a cell to display 'Complaints imported between (earliest date in the list) - (Latest date in the list)

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

    Re: dates appearing as generic code when mixed with text in a formula

    Any time you combine data using & (or concatenate), the result is always text.

    Try this on both the small and MAX...
    ="aaa "&TEXT(today(),"dd/mm/yyyy")
    ie
    ="Complaints Imported between "&text(SMALL('Data Import'!J:J,1),"dd/mm/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
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: dates appearing as generic code when mixed with text in a formula

    Quote Originally Posted by mtleigh View Post

    I have tried adding the text formula around the small and max functions but it is not working. any ideas?
    What does that look like?

    It should look something like this:

    TEXT(SMALL('Data Import'!J:J,1),"dd/mm/yyyy")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    04-28-2016
    Location
    Manchester, England
    MS-Off Ver
    Office 365
    Posts
    13
    Quote Originally Posted by Tony Valko View Post
    What does that look like?

    It should look something like this:

    TEXT(SMALL('Data Import'!J:J,1),"dd/mm/yyyy")
    I tried that earlier but it didnt work

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: dates appearing as generic code when mixed with text in a formula

    Quote Originally Posted by mtleigh View Post
    I tried that earlier but it didnt work
    Be more specific. What does "didnt work" mean?

    Did you get an incorrect result? An error? Something else?

    Show us the formula you tried.

  6. #6
    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,938

    Re: dates appearing as generic code when mixed with text in a formula

    Perhaps it would help more if you could upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

    Are you sure you have real dates in column J?

  7. #7
    Registered User
    Join Date
    04-28-2016
    Location
    Manchester, England
    MS-Off Ver
    Office 365
    Posts
    13

    Re: dates appearing as generic code when mixed with text in a formula

    ok so I tried ="Complaints Imported between "&SMALL('Data Import'!J:J,1)&" - "&MAX('Data Import'!J:J) (Returns dates as numbers rather than dates)
    and then I tried ="Complaints Imported between "&TEXT(SMALL('Data Import'!J:J,1),"dd/mm/yyyy"&" - "&TEXT(MAX('Data Import'!J:J),"dd/mm/yyyy")) (Returns #VALUE!)

    It is cell H1 where I am trying to enter the formula to ultimately display 'Complaints imported between (earliest date in the list) - (Latest date in the list)' (the date list being Column J on the data import sheet.
    Last edited by mtleigh; 05-06-2016 at 05:15 AM. Reason: attachment added

  8. #8
    Registered User
    Join Date
    04-28-2016
    Location
    Manchester, England
    MS-Off Ver
    Office 365
    Posts
    13

    Re: dates appearing as generic code when mixed with text in a formula

    I found it guys. When I had the TEXT in I had misplaced one of the closed brackets so it works now. new day clean head

    so my final formula which works is now:

    ="Complaints Imported between "&TEXT(SMALL('Data Import'!J:J,1),"dd/mm/yyyY")&" - "&TEXT(MAX('Data Import'!J:J),"dd/mm/yyyy")

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: dates appearing as generic code when mixed with text in a formula

    Good deal!

+ 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] Formula to count mixed Text
    By JO505 in forum Excel General
    Replies: 3
    Last Post: 09-25-2015, 03:48 PM
  2. [SOLVED] Formula to extract text only from mixed string
    By FatKidonaTrampolin in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-23-2015, 09:29 AM
  3. VBA code needed: Posting three most appearing text string in a culomn
    By ehmail84 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-20-2014, 05:52 AM
  4. Replies: 11
    Last Post: 02-11-2013, 08:10 AM
  5. [SOLVED] Identifying text within column of cells, and applying a generic code in next column
    By ScotsExpat in forum Excel - New Users/Basics
    Replies: 11
    Last Post: 08-16-2012, 01:00 AM
  6. Separating text and numbers from a mixed code
    By amahesh101 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-10-2010, 03:42 AM
  7. Formula mixed with text
    By therion82 in forum Excel General
    Replies: 5
    Last Post: 01-15-2010, 04:51 PM

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