Sorry, I should have made that clearer. The real question was to confirm that
you were combining the value (22) with text (years) into the same cell.
(which you are)
The formula I gave you will take the value from the cell, add 1 to it, then
add on the text string. Simply place it into an empy column and copy down as
needed.
A macro solution
Sub addnumbertotext()
'=LEFT(J5,FIND(" ",J5)-1)+1& " years"
For Each c In Range("b2:b22") 'Selection
c.Value = Left(c, InStr(c, " ") - 1) + 1 & " years"
Assuming the cells in the range contain either whole numbers or, if floating
point numbers are used, the decimal point for the system is a "dot", then
this statement...
Instead of putting the string " years" in each cell, couldn't you just add it to
the column header--then everyone will know that field is.
If you like that idea, you could remove the " years" from each cell by:
Selecting the range
Edit|replace (xl2003 menus)
what: _years (where _ means space character)
with: (leave blank)
replace all
==========
If you don't like that idea, you could still remove the string from each cell,
but then give the column a custom format:
Then the value will still be numeric (for further calculations), but the cell
will look pretty.
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.