Giri
07-10-2011, 03:21 AM
Hi Guys,
Could someone please let me know how to write the formula to SUM two ranges when the two ranges have been defined as variables of type range?
E.g
Dim rangeOne as Range
Dim rangeTwo as Range
Set rangeOne = Range("A1")
Set rangeTwo = Range("A5")
So if I wanted to use "rangeOne" and "rangeTwo" in the SUM formula, how would that be written?
Range("B1").Formula = ????
Thank you!
Kind Regards,
Giri
Could someone please let me know how to write the formula to SUM two ranges when the two ranges have been defined as variables of type range?
E.g
Dim rangeOne as Range
Dim rangeTwo as Range
Set rangeOne = Range("A1")
Set rangeTwo = Range("A5")
So if I wanted to use "rangeOne" and "rangeTwo" in the SUM formula, how would that be written?
Range("B1").Formula = ????
Thank you!
Kind Regards,
Giri