Forum Discussion

Emily Salerno's avatar
Emily Salerno
Copper Contributor
May 01, 2017
Solved

Need help with inserting formula inside text please.

I did a search for this and I almost have the formula right but it's not giving me the correct output answer I need.

 

In my spreadsheet, A3 is today's date 5/1

In another cell I have =SUM(A3+24)

   which gives me the correct output of today's date 5/1 plus 24 more days 5/25.

 

I'd like to have 5/25 populate in a cell within text like this:

Your 5/25 task is due today.

 

I tried

="Your "&SUM(A3+24)&" task is due today"

but the output gives me a strange number, not the 5/25 I want to see.

 

Thanks for your help in advance.

 

  • Hi Emily,

     

    1) Instead of =SUM(A3+24) you may simply use =A3+24

    2) Numeric representation of the May 25, 2017 is 42880, i guess you receive this number in you string. Use text formatted in your date format here, i.e.

    ="Your " & TEXT(A3+24,"mm/dd") & " task is due today"

     

     

  • Detlef_Lewin's avatar
    Detlef_Lewin
    Silver Contributor

    Hello Emily

     

    SUM(A3+24) is superfluid. :-)

    Either A3+24 or SUM(A3,24).

     

    For your output use the TEXT() function.

    ="Your "&TEXT(SUM(A3,24),"D/M")&" task is due today"

     

     

  • Hi Emily,

     

    1) Instead of =SUM(A3+24) you may simply use =A3+24

    2) Numeric representation of the May 25, 2017 is 42880, i guess you receive this number in you string. Use text formatted in your date format here, i.e.

    ="Your " & TEXT(A3+24,"mm/dd") & " task is due today"

     

     

    • Emily Salerno's avatar
      Emily Salerno
      Copper Contributor

      Thank you to both of you.

      I guess I'm old school Excel when you had to put SUM-thing in there LOL.

      • SergeiBaklan's avatar
        SergeiBaklan
        MVP

        Emily, in Excel dates are always numbers where 1 is Jan 01, 1900 (and decimal part is the time). You may operate with dates as with any other numbers, formatting and specific date functions are only to make the interface of such operations more human friendly.

Resources