Get Number From Within Text String

F

Fellow

I have cells containing formulas similar to this:
=$B19-$B18+1&" days"
Where B19 and B18 are dates.
Let's say the result of one such cell is "54 days". Is it possible to
somehow ignore "days" and use "54" in another calculation?

Fellow
 
D

Dave Peterson

You could give the cell a custom format:

Format|Cells|Number tab|Custom category
General" days"
or
#,##0" days"
 
B

Bernie Deitrick

If the formula is in B20:

=VALUE(SUBSTITUTE(B20," days",""))

HTH,
Bernie
MS Excel MVP
 
R

Ron Rosenfeld

I have cells containing formulas similar to this:
=$B19-$B18+1&" days"
Where B19 and B18 are dates.
Let's say the result of one such cell is "54 days". Is it possible to
somehow ignore "days" and use "54" in another calculation?

Fellow

Why not just use:

=$B19-$B18+1

in your other calculation?
--ron
 
Top