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

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
42,724 questions
{count} votes

Your answer

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