Share via

dynamic range in excel scripts

Steven D 0 Reputation points
2024-08-13T13:51:17.5133333+00:00

Hi,

I would like to know how to "autofill" to a dynamic range of cells in script.

For example in VBA your would define all the ranges and count for example

Dim inlr As Long, X As Long

then count the cells

inlr = .Range("A" & Rows.Count).End(xlUp).Row

Then to do a task in between.

For X = 2 To inlr

range("A" & X).value = "This"

Next X

Can you please tell me to do this.

Thanks

Community Center | Not monitored

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.