Application.WorksheetFunction error

  • Thread starter Thread starter Ayo
  • Start date Start date
A

Ayo

This line of code is not working. Any ideas?

Worksheets(1).Range("B22").Value =
Application.WorksheetFunction.Sum(Range("B17:B20"))
 
Are there any worksheetfunctions that are returning and Error value in B17:B20?

HTH,
Bernie
MS Excel MVP
 
Thanks. I figured it out.
Worksheets(1).Range("B22").Value =
Application.WorksheetFunction.Sum(Worksheets(1).Range("B17:B20"))
I was missing the "Worksheets(1)." in the sum function.
 
Thanks. I figured it out.
Worksheets(1).Range("B22").Value =
Application.WorksheetFunction.Sum(Worksheets(1).Range("B17:B20"))
I was missing the "Worksheets(1)." in the sum function.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top