I need to get a sum of columnar data from an excel spreadsheet. I can get some data but not all because I won't know which column I'm working in until run time.
I have an idea of converting the numerical column reference to an letter but I'd rather just use R1C1 formatting if possible to simplify the procedure.
Thanks in advance
I have an idea of converting the numerical column reference to an letter but I'd rather just use R1C1 formatting if possible to simplify the procedure.
Code:
'This Fails due to the colon
Debug.Print WorksheetFunction.Sum(R11C & intColumn:R1017C & intColumn)
'This works but only sums the first and last of the range.
Debug.Print WorksheetFunction.Sum(R11C & intColumn,R1017C & intColumn)
'This also fails as I am using Range improperly but don't understand why yet.
If Range.Select(R11C[intColumn],R1017C[intColumn])
Thanks in advance