Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following gives me a Compile Error:Invalid Qualifier (highlights the Sum
word) For x = 0 To 9 Range("B4").Activate y = WorksheetFunction.Sum(Range(ActiveCell.Offset(x, 0), ActiveCell.Offset(x, 23))).Value Next Whats wrong? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Give this a try...
For x = 0 To 9 Range("B4").Activate y = Application.Sum(Range(ActiveCell.Offset(x, 0), ActiveCell.Offset(x, 23))).Value Next or For x = 0 To 9 Range("B4").Activate y = Application.WorksheetFunction.Sum(Range(ActiveCell .Offset(x, 0), ActiveCell.Offset(x, 23))).Value Next -- HTH... Jim Thomlinson "Scott" wrote: The following gives me a Compile Error:Invalid Qualifier (highlights the Sum word) For x = 0 To 9 Range("B4").Activate y = WorksheetFunction.Sum(Range(ActiveCell.Offset(x, 0), ActiveCell.Offset(x, 23))).Value Next Whats wrong? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The second recommendation gave me the same original compile error. The first
got past the compile but gives me a runtime error '424' object required. -------------------------------------------------------------------- "Jim Thomlinson" wrote: Give this a try... For x = 0 To 9 Range("B4").Activate y = Application.Sum(Range(ActiveCell.Offset(x, 0), ActiveCell.Offset(x, 23))).Value Next or For x = 0 To 9 Range("B4").Activate y = Application.WorksheetFunction.Sum(Range(ActiveCell .Offset(x, 0), ActiveCell.Offset(x, 23))).Value Next -- HTH... Jim Thomlinson "Scott" wrote: The following gives me a Compile Error:Invalid Qualifier (highlights the Sum word) For x = 0 To 9 Range("B4").Activate y = WorksheetFunction.Sum(Range(ActiveCell.Offset(x, 0), ActiveCell.Offset(x, 23))).Value Next Whats wrong? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Get rid of the .Value at the end of the statement...
For x = 0 To 9 Range("B4").Activate y = WorksheetFunction.Sum(Range(ActiveCell.Offset(x, 0), _ ActiveCell.Offset(x, 23))) Next -- HTH... Jim Thomlinson "Scott" wrote: The second recommendation gave me the same original compile error. The first got past the compile but gives me a runtime error '424' object required. -------------------------------------------------------------------- "Jim Thomlinson" wrote: Give this a try... For x = 0 To 9 Range("B4").Activate y = Application.Sum(Range(ActiveCell.Offset(x, 0), ActiveCell.Offset(x, 23))).Value Next or For x = 0 To 9 Range("B4").Activate y = Application.WorksheetFunction.Sum(Range(ActiveCell .Offset(x, 0), ActiveCell.Offset(x, 23))).Value Next -- HTH... Jim Thomlinson "Scott" wrote: The following gives me a Compile Error:Invalid Qualifier (highlights the Sum word) For x = 0 To 9 Range("B4").Activate y = WorksheetFunction.Sum(Range(ActiveCell.Offset(x, 0), ActiveCell.Offset(x, 23))).Value Next Whats wrong? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I enter formula sum(range+range)*0.15 sumif(range=3) | Excel Discussion (Misc queries) | |||
Doing a copy-paste offest between 2 workbooks | Excel Programming | |||
Excel Addin:Setting the range to the Excel.Range object range prop | Excel Worksheet Functions | |||
Page Numbering Offest by Two | Excel Programming | |||
how to? set my range= my UDF argument (range vs. value in range) [advanced?] | Excel Programming |