Thread: [Solved] VB Error
View Single Post
 
Old 04-07-2022, 07:00 AM
croberts croberts is offline Windows 10 Office 2019
Novice
 
Join Date: Apr 2022
Posts: 12
croberts is on a distinguished road
Default

Problems highlighted in Red.

Public Function Disney_Stamp_Listings_2022 (pRange1 as Range, pRange2 as Range) As Double

Application.Volatile
Dim rng As Range
Dim xTotal As Double
xTotal = 0
For Each rng In pRange1
If rng.Font.Color = p2Range.Font.Color Then
xTotal = xTotal + rng.Value
End If
Next
Disney_Stamp_Listings_2022 = xTotal
End Function
Reply With Quote