View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
qcan qcan is offline
external usenet poster
 
Posts: 20
Default Looking For A Formula

On Sep 2, 3:52*pm, GS wrote:
GS explained on 9/2/2011 :

Try...


Sub DenoteCellsGreaterTanZero()
* Dim r
* For r = 1 To ActiveSheet.UsedRange.Rows.Count
* * If Application.WorksheetFunction.CountIf(Rows(r), "0") 0 _
* * * *Then Cells(r, 1) = "x"
* Next 'r
End Sub


Note that this is a programming group!
BUT
Since you asked for a formula...

* =IF(COUNTIF(B1:AE1,"0"),"x","")

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Hey Gary,

I tried both the formula and the macro that you created. Maybe I am
doing something wrong, but it is always returning an "X" in every row
as it will eventually find a number greater than zero. I don't think I
was clear enough in my explanation. What I wanted was an "X" in either
one row or another only once it encounters the number greater than
zero. Therefore, only each set of two rows will contain an "X".... not
both - and of course it must search in the pattern that I previouisly
stipulated.