Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Worksheetfunction help

This gives me an error. What have I done wrong?
sRow=6
newval = Application.WorksheetFunction.Sum("ah" & sRow & ":DD" & sRow)

Glen


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default Worksheetfunction help

Glen
You can't just put in a range address like you can when you use the Sum
formula in a worksheet. You must state that this is a range. Something
like:
newval = Application.WorksheetFunction.Sum(Range("ah" & sRow & ":DD" &
sRow))
HTH Otto
"Glen Mettler" wrote in message
...
This gives me an error. What have I done wrong?
sRow=6
newval = Application.WorksheetFunction.Sum("ah" & sRow & ":DD" & sRow)

Glen




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 99
Default Worksheetfunction help

Hi

To which worksheet you are referring to? Try MS Help example as muster:
....
sRow=6
myRange=Worksheets("Sheet1").Range("AH" & sRow & ":DD" & sRow)
newval=Application.WorksheetsFunction.Sum(myRange)


Arvi Laanemets


"Glen Mettler" wrote in message
...
This gives me an error. What have I done wrong?
sRow=6
newval = Application.WorksheetFunction.Sum("ah" & sRow & ":DD" & sRow)

Glen




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Worksheetfunction help

Interesting. The example I have from an Excel "Guru" book shows
"WorksheetFunction.Sum("A1:J4")

Thanks
Glen

"Glen Mettler" wrote in message
...
This gives me an error. What have I done wrong?
sRow=6
newval = Application.WorksheetFunction.Sum("ah" & sRow & ":DD" & sRow)

Glen




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default Worksheetfunction help

That just proves that all self-certified "gurus" aren't <g. It should say

WorksheetFunction.Sum(Range("A1:J4"))

On Wed, 9 Feb 2005 14:27:41 -0600, "Glen Mettler"
wrote:

Interesting. The example I have from an Excel "Guru" book shows
"WorksheetFunction.Sum("A1:J4")

Thanks
Glen

"Glen Mettler" wrote in message
...
This gives me an error. What have I done wrong?
sRow=6
newval = Application.WorksheetFunction.Sum("ah" & sRow & ":DD" & sRow)

Glen






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
WorksheetFunction help Ayo Excel Discussion (Misc queries) 2 July 20th 08 10:48 PM
Can't use WorksheetFunction Yossi Excel Discussion (Misc queries) 5 January 25th 06 10:07 PM
worksheetfunction GMet Excel Programming 2 September 27th 04 05:36 PM
WorkSheetFunction.CountIf & WorkSheetFunction.SumIf with 2 conditions? Etien[_2_] Excel Programming 3 January 13th 04 04:07 PM
WorksheetFunction Stuart[_10_] Excel Programming 3 November 13th 03 12:33 AM


All times are GMT +1. The time now is 10:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"