Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Worksheets
Unknown error in function, and how to return value?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Chris, post: 3825031"] Mike, you're my hero. Here's the final script/function with a couple changes: Function SalesTotal() As Integer Dim varDate As Date Dim c As Range varDate = ActiveCell.Offset(-1).Value SalesTotal = 0 LastRow = Sheet19.Cells(Rows.Count, "M").End(xlUp).Row Set MyRange = Sheet19.Range("M1:M" & LastRow) For Each c In MyRange If c.Value = varDate Then SalesTotal = (SalesTotal + c.Offset(, 2).Value) End If Next If IsError(SalesTotal) Then SalesTotal = 0 End Function [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Worksheets
Unknown error in function, and how to return value?
Top