Forum Discussion

JQuinn's avatar
JQuinn
Copper Contributor
Jul 23, 2020

Excel formatting in a mixed cell

Hello,

I'm trying to set up a cell to display "on mm/dd/yy", where the date is pulled from another cell via an index and match function. 

The cell formula is  ="on "&INDEX(...)). However, instead of showing "on 7/22/20", the result returns the numeric equivalent of the date - for example, "on 44034".  I can't figure out how to get it to display the date format within this mixed cell content.  Can anyone help?

Sincerely,

JQuinn

7 Replies

  • mathetes's avatar
    mathetes
    Silver Contributor

    JQuinn 

     

    Assuming your date is in cell A1, use this ="on "&TEXT(A1,"m/d/y")

     

    Because what you're doing is creating a text entry, you need to turn the date into a text and format it. The TEXT function takes care of that, and one of the arguments is the way you want it displayed. The same sort of thing would apply if you were dealing, say, with financial numbers and wanted it to be in dollars and cents.

    • JQuinn's avatar
      JQuinn
      Copper Contributor

      Thank you for the offer.  However, there's a ton of confidential info in that file, some of which is integral to the that cell.  For now, I'll just generate the Index/Match date elsewhere and refer to it in the mixed content cell, using your suggested approach.

      Gratefully,

      JQuinn

       

      mathetes 

    • JQuinn's avatar
      JQuinn
      Copper Contributor

      mathetes 

       

      Thank you.  That works.  

      I just need to figure out how to merge it with the Index-Match formula, so I don;t need to point to an alternate cell for the date.
      Thanks, again,
      JQuinn
      • SergeiBaklan's avatar
        SergeiBaklan
        Diamond Contributor

        JQuinn 

        Alternatively you may apply to the cell into which INDEX/MATCH returns the date custom format like

        Plus is that it still will be a date, not text, with which you may work - compare with our dates, whatever.

Resources