Help needed to write a "SUMIF" formula in VBA
I am using Excel 2000 and I have a question regarding a "sumif" formula. I
use a wookbook to calculate petty cash purchases daily with a table with all
the calculations on sheet1. I wish to change the calculations to VBA to stop
any corruption of sheet1 which I have done apart from the formula
+sumif(E9:E16,"TH",B9:B16) the "TH" being an employee's initials. I would
like to change "TH" to a cell reference that being sheet2.range("B2") if
that is possible so that the formula would be equivalent to
+sumif(E9:E16,"SHEET2.RANGE("B2")",B9:B16) in VBA
many thanks in advance
regards JIM BROOKS
|