I have an Excel macro and that selects certain rows (based on a text string) and then copies that row to another worksheet. This is working fine.
However, after all the necessary rows have been copied and pasted to the other sheet, I want to assign a range name to all of the copied rows. I am using the CurrentRegion.Select syntax to select all of the data, but I do not know how in VBA to give this range a name.
Thank you for the reply.
Unfortunately, I cannot hard code any cell references because the size of the range will change each time I run my macro.
Is there a way to put something in the RefersTo property so that it will change dynamically?