RastaBananaa
New Member
- Joined
- Apr 23, 2018
- Messages
- 8
Hi All,
Facing a problem which (again) I cannot figure out.
I need to SumTotal(or add up using any other function) numbers which could appear in different columns and can have a dynamic range(the numbers needed to be totalled can be anywhere from row 1 - 10,000)
If helps, the numbers will ever only appear in 4 columns; Q, R, S, T though I would like to avoid having a pre-defined location in the code.
So far I have tried cases but when looking for the array which contains the same word, VBA does not know which case to use and thus SumTotal returns 0. The below is the function currently using:
SumTotal = WorksheetFunction.Sum(Range("T2", Range("T2").End(xlDown)))
Range("AC2").Value = SumTotal
Though this function has a pre-defined range which would only work in one of the 4 different sheets.
Hoping someone can help.
Thanks in advance,
RastaBananaa
Facing a problem which (again) I cannot figure out.
I need to SumTotal(or add up using any other function) numbers which could appear in different columns and can have a dynamic range(the numbers needed to be totalled can be anywhere from row 1 - 10,000)
If helps, the numbers will ever only appear in 4 columns; Q, R, S, T though I would like to avoid having a pre-defined location in the code.
So far I have tried cases but when looking for the array which contains the same word, VBA does not know which case to use and thus SumTotal returns 0. The below is the function currently using:
SumTotal = WorksheetFunction.Sum(Range("T2", Range("T2").End(xlDown)))
Range("AC2").Value = SumTotal
Though this function has a pre-defined range which would only work in one of the 4 different sheets.
Hoping someone can help.
Thanks in advance,
RastaBananaa