adding text in front of

D

Don Guillett

try

Sub adddash()
mc=activecell.column
lr=cells(rows.count,mc).end(xlup).row
For Each c In range(cells(2,mc),cells(lr,mc))
If Len(c) > 1 Then c.Value = "- " & c
Next c
End Sub
 
B

Bill Kuunders

one way
say your names are in column B
insert a new column C
enter in C1 ="- "&B1
extend this down the column
to change the formula's to data
edit copy, edit paste special, values, on the C column

delete the original column B
 
T

the mailman

I hope I am doing something right here

Travel # module / site compartment box names RR # or LB Month 911 #
NUMBERED COMPANY
moved - 405461 LB
moved - 534806 LB
407 - 535172 LB
603 - 535172 LB
moved - 707835 LB
10 - 872877 LB
10 1103730 LB
550 1262472 LB
583 1311643 LB
550 1362472 LB
602 1543776 LB
330 1582643 LB
608 1599212 LB
48 1606068 LB
190 2024718 LB
415 2043767 LB
77 1239104 Ont Inc c/o Graham Dudley RR2 NOV 1241
119 143468163RP0001 LB
1 145 -2847ONT. INC. c/oPHIPPS Harley RR3 DEC 5816
47 2 15 GMB 1452847 Ont Inc c/oZours,Olaf RR2 DEC 1309
23 1617434 ON. INC c/o TRUSSLER RR2 DEC 1241
51 1639752 ONT INC. NOT # 51
190 2024718 ONTARIO LIMITED LB
74 2089176 ONT. INC. c/o Joe Desrochers RR2 JULY 5730
22 2757-6610 Que Inc c/o Dupuis RR2 OCT 1288
523 495988 ONTARIO LIMITED LB
389 534805 HOLDING CO LB
12 1 0 GMB 647200 ONT. INC. c/o BUTLER LAKE TRUCK STOP RR1 DEC 6378
353 9030-4965 Inc. LB
504 9068-3962 Que INC LB
Travel # module / site compartment box names RR # or LB Month 911 #
A
209 A & A GROUP LB
190 A & G FRESHMART LB
61 A&A AUTO ELECTRIC RR2 NOV 1575
516 A.P.S. SERVICES LB
112 ABORIGINAL HEALING LB
565 AGRICULTURE SOCIETY LB
407 AITCHISON,Robert,Joyce,Jack LB
17 1 6 GMB AKULICK,Alex,Geneva RR1 MAR
9 RMB AKULICK,William,Paul RR1 NOV 2370
130 ALARIE CONSTRUCTION LB
130 ALARIE Eddie Shirley Marcel LB


--
Our website :
http://timmins22.adventistchurchconnect.org/index.php

Our Bible School :
http://www.discoveronline.org/schools/647
 
D

Don Guillett

Please do NOT attach files to this ng.

You STILL have not explained what you want. Do you want to add a dash to all
cells in column c or part of c or what, if there is not already a dash
there? Again, mindreading mode turned off. If you can't tell us what you
want, we can't help you.
 
D

Don Guillett

Attaching files to THIS ng is considered bad netiquette.
Your illustration shows col E instead of C and you DID say the entire
column. SO.

Sub adddash()
lr = Cells(Rows.Count, "e").End(xlUp).Row
For Each c In Range(Cells(2, "e"), Cells(lr, "e"))
If Len(c) > 1 And Left(c, 2) <> " -" Then c.Value = "- " & c
Next c
End Sub
 
D

Don Guillett

It's hard for me to say with your refusal to tell anyone anything except
"it's not working for me"
What did you do? Where did you put the code? How did you fire it? etc.
 
D

Don Guillett

You must have had
option explicit
at the top of the module requiring dim. Comment out or
==========
Option Explicit

Sub adddash()
Dim lr As Long
Dim c As Range
lr = Cells(Rows.Count, "e").End(xlUp).Row
For Each c In Range(Cells(3, "e"), Cells(lr, "e"))
If Len(c) > 1 And Left(LTrim(c), 1) <> "-" _
Then c.Value = "- " & c
Next c
End Sub
==========
 
Top