macro needs to reference cell values in different worksheets
How to I program a macro to add two numbers from a different worksheet (in
the same workbook) and store the result in the current worksheet? I already
tried,
Cells(5, y).Value = Sheets("Summary").Cells(4, 2).Value +
Sheets("Summary").Cells(5, 2).Value
This is preceeded by a loop (also not working because of the worksheet
reference) that looks across row 4 for a matching date so that it can put the
daily data into the historical worksheet. This loop is controlled by:
Do Until Cells(4, y).Value = Sheets("Summary").Cells(2, 3).Value
I think the problem is in trying to reference the other sheet. If it was
just a formula, I would use Summary!Cells(2,3) but that doesn't work in a
macro either.
I'm using Excel 2003. Thanks for your assistance.
Jim
|