Execellent - Thank you!
May I ask a follow-on question? I need to calculate a ratio between the
same range on two different sheets. In the code that follows, WriteSum
evaluates perfectly. But the code fails to select the range on the second
sheet. Any thoughts?
My code:
With Sheets("sheet1")
.Range(.Cells(Row1, Col1), .Cells(Row2, Col2)).Select
End With
For Each c In Selection
If (IsNumeric(c)) Then WriteSum = WriteSum + c.Value
Next
With Sheets("sheet2")
.Range(.Cells(Row1, Col1), .Cells(Row2, Col2)).Select
End With
For Each c In Selection
If (IsNumeric(c)) Then GridSum = GridSum + c.Value
Next
Ratio = (txt_SpreadAmt.Value - GridSum + WriteSum) / WriteSum