Subtract two dates (decrementing daily) and add text

P

Peter

I can add text to a number ok; that's straightforward, but I cannot add text
to formula. Eg. =B2-G6&" text". I am trying to have an ongoing formula
subtracting one date from another and tag "days to go" at the end. I thought
I would have found this in the help section easily enough but nooo...
Any advice anyone?
P
 
D

David Biddulph

The formula you have is correct. What is your problem? What do you have in
B2 and in C6? What result did you get? What result did you expect?
 
J

John C

What are you getting? It works for me. Is this the only formula? Or is this
formula to be copied down or to the right, etc.?
 
T

TomPl

It works for me as well.

Another option would be to format the cell with the custom format:
0 " Days To Go"
 
S

ShaneDevenshire

Hi,

The only reason I can think of that your formula does not work is if the
entries in B2 or G6 are not really dates either because there is extra spaces
or because they are not in a legal date syntax. In this case I would expect
a VALUE error. And you would get that even if you didn't have the text
added.

To deal with leading or trailing spaces try the following formula:
=TRIM(F10)-TRIM(E10)&" days to go"

To deal with illegal syntax enter the two date in m/d/yy order. For
example, Oct-20-2008 is an illegal syntax but it will display in the cell in
a way that you might think it's a date. Retype the dates as I suggested.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top