R
Ruth_C
I have a worksheet with 3000 rows. I would like to set the initial value of
cells in columns C,d,e,f to 0.00. I am using the code below which works
fine. Is there a way of doing this in one line or using an array instead of
how I am doing it. I would also like to print on the screen the value of
count but I do not know how to return this and have it show on the screen for
the user.
Sub initializeCells()
Dim i, count As Integer
v = 0#
n = Cells(Rows.count, "C").End(xlUp).Row
For i = 13 To n
Cells(i, "C").Value = v
Cells(i, "D").Value = v
Cells(i, "E").Value = v
Cells(i, "F").Value = v
count = i
Next
End Sub
Ruth_C
cells in columns C,d,e,f to 0.00. I am using the code below which works
fine. Is there a way of doing this in one line or using an array instead of
how I am doing it. I would also like to print on the screen the value of
count but I do not know how to return this and have it show on the screen for
the user.
Sub initializeCells()
Dim i, count As Integer
v = 0#
n = Cells(Rows.count, "C").End(xlUp).Row
For i = 13 To n
Cells(i, "C").Value = v
Cells(i, "D").Value = v
Cells(i, "E").Value = v
Cells(i, "F").Value = v
count = i
Next
End Sub
Ruth_C