Macro that Fills Sequential numbers

D

David A.

As you see below I am trying to fill cells with "CSR1, CSR2..... How do I
right that without caling each cell?
Sheets("Team List").Select
Range("B2:B16").ClearContents
Range("B2").Value = "CSR1"
Range("B3").Value = "CSR2"
Range("B4").Value = "CSR3"
Range("B5").Value = "CSR4"
Range("B6").Value = "CSR5"
 
M

Mike H

David,

Is this any good?

Sub liminal_Advertising()
Sheets("Team List").Select
x = 1
Dim myRange As Range
Set myRange = Range("B2:B16")
For Each c In myRange
c.Value = "CSR" & x
x = x + 1
Next
End Sub

Mike
 
D

David A.

Thank you that is just waht I needed.....

Mike H said:
David,

Is this any good?

Sub liminal_Advertising()
Sheets("Team List").Select
x = 1
Dim myRange As Range
Set myRange = Range("B2:B16")
For Each c In myRange
c.Value = "CSR" & x
x = x + 1
Next
End Sub

Mike
 
J

JE McGimpsey

One way:

With Sheets("Team List").Range("B2")
.Value = "CSR1"
.AutoFill Destination:=.Resize(15, 1)
End With
 
Top