Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to figure out how to append text at the end of cells in a column that has a number. Some cells do not have anything so I don't want to copy the word into those cells.

If I have column "B" that only has some cells with a number in them and I want to append the word "watts" behind the number, how would I do that?

enter image description here

I want to keep the number, but add the word "watts" at the end.

share|improve this question

2 Answers 2

Assuming your data column (with some cells having numbers) is Column B as stated in the question, use the following formula for your cells in, say Column C:
=IF(ISNUMBER(B1),B1&"Watts","")

This checks:
1. if the cell value is a number using the ISNUMBER() function
2. if yes, appends "Watts" using the string concatenation operator ("&")
3. else, it makes the cell blank (if you remove the "", you'd get the return value of the IF() function in the cell saying "FALSE")

share|improve this answer
    
+1 for clear explanation –  Dave Oct 15 '12 at 11:57
1  
Great answer. Might be worth mentioning this formula goes into another column, not run in the same as the numbers are in now. –  CharlieRB Oct 15 '12 at 12:32
1  
@CharlieRB I updated it now to say that something like Column C should have the formula. Hope that helps. –  M K Oct 15 '12 at 12:35

Another way would be to use custom formatting to change the display in situ:

Select your whole range of data in column B, right click > Format Cells > Number > Custom

and in the "Type:" box type

0" watts"

exactly like that

That only changes the display so you can still do calculations with the numbers (like sum the column or similar).....and it won't be applied to cells that are blank or text.

Note: that format assumes integers as per the example shown, if you might want decimals or integers change to general" watts"

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.