I am trying to create a function that loops through 40 worksheets and adds the values in the worksheets that are between two dates. When I run the function I get an "End If without Block If" error. When I delete the last End If then I get an "invalid next control variable reference" error. Any help would be greatly appreciated. Thanks!I am trying to create a function that loops thr