Trying to make selection dynamic such that when number of rows increases or decreases the selection also gets according to it. Below is the example.
What I want is: Want to select range C4:C8 as data in Column A starting from A3 is till A8. And in Table 2: Only C3 to be selected as in Column only data is there only in A3.
I have used the code as
Range("C4").Select
Selection.AutoFill Destination:=Range("C4:C" & Range("A" & Rows.Count).End(xlUp).Row)
Range(Selection, Selection.End(xlDown)).Select
It is working for Table 1 but when it is running on Table 2 then it is running for entire column which takes lot more time.
Please help in this getting right code so that it could work in both cases.
What I want is: Want to select range C4:C8 as data in Column A starting from A3 is till A8. And in Table 2: Only C3 to be selected as in Column only data is there only in A3.
I have used the code as
Range("C4").Select
Selection.AutoFill Destination:=Range("C4:C" & Range("A" & Rows.Count).End(xlUp).Row)
Range(Selection, Selection.End(xlDown)).Select
It is working for Table 1 but when it is running on Table 2 then it is running for entire column which takes lot more time.
Please help in this getting right code so that it could work in both cases.