I hope I can explain this properly. I have a couple questions that are somewhat related if you please.
I’m trying to create a VBA routine that deletes all consecutive rows that contain data starting in B33. The number of rows will vary from Row 33 on down to Row XXXX.
I was attempting to create a range called Data by doing a Macro Recording. In this case, it hardcodes in the last row (392). However, the next time I need to run this macro the last row may not be 392.
Thanks,
Steve K.
I’m trying to create a VBA routine that deletes all consecutive rows that contain data starting in B33. The number of rows will vary from Row 33 on down to Row XXXX.
I was attempting to create a range called Data by doing a Macro Recording. In this case, it hardcodes in the last row (392). However, the next time I need to run this macro the last row may not be 392.
VBA Code:
Range("B33").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWorkbook.Names.Add Name:="Data", RefersToR1C1:= _
"=Amortize!R33C2:R392C2"
ActiveWorkbook.Names("Data").Comment = ""
Thanks,
Steve K.