Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
1) If I'm writing a worksheet_change for sheet1, how do i get it to reference
sheet2? That is, I want Sum(Sheet2!A2:A10)? 2) If I have A1=Sum(Range("A2:A10")) written into VB, how do I make it update automatically when I change the value in, say, A3? Thanks. JRD-CFW |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
If you put this formula:
=SUM(A2:A10) in cell A1 it will automatically update any time there is a change to the worksheet. However, if you need to do it in code, try this: Sub testit() ActiveSheet.Range("A1").Value = WorksheetFunction _ ..Sum(Range("A2:A10")) End Sub I hope that helps. Tom |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I forgot it was a different sheet. Try this:
Sub testit() ActiveSheet.Range("A1").Value = WorksheetFunction _ ..Sum(Sheets("Sheet2").Range("A2:A10")) End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
View Questions and Answer to questions I created | Excel Discussion (Misc queries) | |||
2 Questions | Excel Worksheet Functions | |||
2 questions | Charts and Charting in Excel | |||
Max / IF questions | Excel Discussion (Misc queries) | |||
Two Questions | New Users to Excel |