I need to check all of the worksheets to collect and sum contents. Is there a
with method or something along those lines?
WITH worksheets
if a = b then
Total = a1 + a1
end if
end with
I need to check all of the worksheets to collect and sum contents. Is there a
with method or something along those lines?
WITH worksheets
if a = b then
Total = a1 + a1
end if
end with
For Each sh In Activeworkbook.Worksheets
If Range("A1").Value = Range("B1").Value Then
myTotal = myTotal + Range("A1").Value
End If
Next sh
--
HTH
RP
(remove nothere from the email address if mailing direct)
"DMB" <[email protected]> wrote in message
news:[email protected]...
> I need to check all of the worksheets to collect and sum contents. Is
there a
> with method or something along those lines?
>
> WITH worksheets
> if a = b then
> Total = a1 + a1
> end if
> end with
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks