Jeffrey Lebowski
Member
Hi there,
I have a pretty large macro that I run to validate the accuracy of data in a file. Right now the code has 100 + formulas referencing static ranges and performing calculations. The only problem is as the file grows in size with time, these formulas will need to reference the entire data range.
What is the trick to use variable ranges within a formula?
Is this close:
I have a pretty large macro that I run to validate the accuracy of data in a file. Right now the code has 100 + formulas referencing static ranges and performing calculations. The only problem is as the file grows in size with time, these formulas will need to reference the entire data range.
What is the trick to use variable ranges within a formula?
Is this close:
Code:
Range("B10").FormulaR1C1 = "=SUM(Range(startRow & startCol & ":" & endRow & endCol))"