View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default How do I append the same text to multiple cells?

This should be very quick. Just select the cells and run the macro:

Sub mike()
For Each r In Selection
If IsEmpty(r.Value) Then
Else
r.Value = r.Value & ""
End If
Next
End Sub

--
Gary's Student
gsnu200706


"mike herman" wrote:

I want to add a "" to each cell in a column of cells when the cell isn't
blank. I'm doing this in a macro for multiple workbooks, so I want the
fastest/most efficient way possible.

My current idea is:
Given the column with text is column A, insert a new row with the formula
=IF(T(A2)<"",""&A2,"") and drag that formula down, then paste special
values over into the location I want the data.
Is there a better way?