View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Dana DeLouis Dana DeLouis is offline
external usenet poster
 
Posts: 947
Default best way to test a row for 0 values

I was thinking of using application.sum.
Does this make sense?


One thing that comes to mind is if one cell has +1, and another has -1, and
the rest blank, the Sum is 0.
If all are to have 0 value (not blank), then perhaps one of a few ways:

Sub Demo()
Dim R As Long
Dim Rng As Range

R = 2 'Your (R)ow
Set Rng = Intersect(Rows(R), Range("C:K"))
MsgBox WorksheetFunction.CountIf(Rng, "0") = _
Rng.Cells.Count 'or 9
End Sub

--
HTH :)
Dana DeLouis
Windows XP & Office 2003


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
hit enter too fast. i was thinking of using application.sum. does this
make sense?

--


Gary


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
what's the best way to test a row, columns c through k to see if all the
values are zeroes?

--


Gary