Chris Turner
New Member
I am using a macro to allow data to be entered into a spreadsheet in Columns A and B down 30 rows. I am trying to find a way to define the number of cells based on specific needs. Some times I will need 20 rows of data, other times I will need 30 rows populating, etc. There is a delay in the macro to allow the data to be entered into the last cell before it clears the columns.
I am using this macro:
I want to be able to vary the number of rows. I thought of having the macro read from a hidden cell in the worksheet but not sure if this is the best way to do this. Appreciate any suggestions or help.
I am using this macro:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Application.Count([A1:B30]) = 60 Then
Application.Wait (Now + TimeValue("0:00:03"))
[A1:B30].ClearContents
Range("A1").Select
End If
End Sub
I want to be able to vary the number of rows. I thought of having the macro read from a hidden cell in the worksheet but not sure if this is the best way to do this. Appreciate any suggestions or help.
Attachments
Last edited by a moderator: