Autofill
Maybe...
Sub Macro1()
Dim LastRow as long
dim wks as worksheet
for each wks in activeworkbook.worksheets
with wks
lastrow = .cells(.rows.count,"A").end(xlup).row
.range("b1:b" & lastrow).formular1c1 = "Random 1"
'or ????
.range("B1:b" & lastrow).formula = "=Rand()"
end with
next wks
End Sub
paulinoluciano wrote:
Hi,
No, it is not!
I would like to autofill the column B with Random 1, Random 2, Random
3, Random 5,.... Random n. However this autofill would need to be of
the same size of the column A. Example: If column A has cells
containing data until row 20 thus the macro should add the name random
until there on column B. If column B has cells containing data until
row 1323 thus it should has the name rando until B1323...
--
Dave Peterson
|