View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default Insert a quote mark, then repeat

hi
i miss lotus too. but the business world went microsoft crazy. sigh.
any way maybe this will help you
add quote mark to value.
do loop.
Sub addquote()
Dim r As Range
Dim rd As Range
Range("A1").Select
Set r = Range("A1")
Do While Not IsEmpty(r)
Set rd = r.Offset(1, 0)
r = "'" & r
Set r = rd
Loop
End Sub

for next loop
Sub addstuff()
Dim r As Range
Dim rd As Range
Set r = Range("A1")
lc = Cells(Rows.Count, "A").End(xlUp).Rows
For c = 1 To lc
Set rd = r.Offset(1, 0)
r = "'" & r
Set r = rd
Next c
End Sub

regards
FSt1
"sam" wrote:

Hi -

This used to be so easy in Lotus!

I want to convert values to labels in a column of 50 cells. Best way to do
so is to insert a quote mark at the beginning of every cell. Attempted to
create a relative macro to do so by: F2 (edit) R1C1\Home\' \Stop. Assigned it
Control Q. Since I have no clue how to make a macro repeat (downwards), I
thought I would just arrow down to the next cell manually, and then Control Q.

All this "brilliant" macro did was copy the contents of R1C1 to R2C1.

I miss Lotus. Sigh..

Thanks to anyone who helps! Tried to search this, BTW.

sam