Thread
:
Add a character to all cells in a column
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
Add a character to all cells in a column
one way
Sub putletterinfront()
For Each c In Range("d2:d9")
If Len(Application.Trim(c)) 1 Then c.Value = "j" & c
Next
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"glenn" wrote in message
...
Hi all
how would i go in VBA to do this:
I have a single worksheet and i have a column with heading COLOR. I do not
know what position color has in my worksheet (it could be column B, C or
any other).
I want to prepend a character "j" to all cells in the column that have a
value.
So if my column initially is like:
COLOR
==========
yellow
pink
orange
after i run the VBA script
it should be
COLOR
==========
jyellow
jpink
jorange
thank you!
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett