Forum Discussion
nlv22
Oct 12, 2022Copper Contributor
Not another 1/0/1900!
Hi all, I am trying to create a macro that will adjust to whatever number of rows needs to be averaged. I start off by calling in one sheet to another, then enter. However, instead of pulling in th...
HansVogelaar
Oct 12, 2022MVP
Let's say you want to do something with cells in column A, starting in row 2. You could use
Dim rng As Range
Dim m As Long
m = Range("A" & Rows.Count).End(xlUp).Row
Set rng = Range("A2:A" & m)
' Do something with rng below
' ...