close
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 withFor Each sh In Activeworkbook.Worksheets
If Range(quot;A1quot;).Value = Range(quot;B1quot;).Value Then
myTotal = myTotal Range(quot;A1quot;).Value
End If
Next sh

--

HTH

RP
(remove nothere from the email address if mailing direct)quot;DMBquot; gt; wrote in message
...
gt; I need to check all of the worksheets to collect and sum contents. Is
there a
gt; with method or something along those lines?
gt;
gt; WITH worksheets
gt; if a = b then
gt; Total = a1 a1
gt; end if
gt; end with
gt;
arrow
arrow
    全站熱搜

    software 發表在 痞客邦 留言(0) 人氣()