VBA summing function

J

Jase

Hi, I am trying to sum a dynamic range with some code but if that range has
"value in it the sum function does not work. I want to exit the function if
if it is unable to sum. Any ideas? heres the code I am using:

Sheets("data").Range("B446").Value =
Application.WorksheetFunction.Sum(Worksheets("data").Range("B" &
Sheets("graphs").Range("D267").Value _
& ":B" & Sheets("graphs").Range("D268").Value))

thanks,

Jase
 

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

Top