ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   worksheetfunction.sum error (https://www.excelbanter.com/excel-programming/334762-worksheetfunction-sum-error.html)

Monique

worksheetfunction.sum error
 
Private sub cmdUpdate_Click()

*other code*
Range ("E44") = Application.WorksheetFunction.Sum("F31:F38")
* other code*

End Sub

This line gives me a run-time error '1004' - Unable to get the Sum property
of the WorksheetFunction class.

I have no idea what this means or how to fix it.

If anyone could help, it is much appreciated.

Thanks


Norman Jones

worksheetfunction.sum error
 
Hi Monique,

Try:

Range("E44") = Application.Sum(Range("F31:F38"))


---
Regards,
Norman



"Monique" wrote in message
...
Private sub cmdUpdate_Click()

*other code*
Range ("E44") = Application.WorksheetFunction.Sum("F31:F38")
* other code*

End Sub

This line gives me a run-time error '1004' - Unable to get the Sum
property
of the WorksheetFunction class.

I have no idea what this means or how to fix it.

If anyone could help, it is much appreciated.

Thanks




Bob Phillips[_7_]

worksheetfunction.sum error
 
You need a range

Range ("E44") = Application.worksheetfunction.Sum(range("F31:F38") )

--
HTH

Bob Phillips

"Monique" wrote in message
...
Private sub cmdUpdate_Click()

*other code*
Range ("E44") = Application.WorksheetFunction.Sum("F31:F38")
* other code*

End Sub

This line gives me a run-time error '1004' - Unable to get the Sum

property
of the WorksheetFunction class.

I have no idea what this means or how to fix it.

If anyone could help, it is much appreciated.

Thanks




JE McGimpsey

worksheetfunction.sum error
 
You need to supply the SUM function a range, not a string:

Range("E44") = Application.WorksheetFunction.Sum(Range("F31:F38") )



In article ,
"Monique" wrote:

Private sub cmdUpdate_Click()

*other code*
Range ("E44") = Application.WorksheetFunction.Sum("F31:F38")
* other code*

End Sub

This line gives me a run-time error '1004' - Unable to get the Sum property
of the WorksheetFunction class.

I have no idea what this means or how to fix it.

If anyone could help, it is much appreciated.

Thanks


Monique

worksheetfunction.sum error
 
Thanks for the advice.... Both suggestions worked...

"Monique" wrote:

Private sub cmdUpdate_Click()

*other code*
Range ("E44") = Application.WorksheetFunction.Sum("F31:F38")
* other code*

End Sub

This line gives me a run-time error '1004' - Unable to get the Sum property
of the WorksheetFunction class.

I have no idea what this means or how to fix it.

If anyone could help, it is much appreciated.

Thanks



All times are GMT +1. The time now is 12:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com