View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_2_] Don Guillett[_2_] is offline
external usenet poster
 
Posts: 1,522
Default Looking For A Formula

On Sep 2, 2:16*pm, qcan wrote:
I have pondered this for a while now. I cannot think of a proper
formula to do the job.

Simply put - I have about 20,000 rows with 2 columns per set. I want
to somehow identify when a number greater than zero first appears - at
which point, I would like to denote it with an X in column A.. There
would be a maximum of 30 columns in each set. The way it would search
for the number per set, is to start in cell B1. If B1 is greater than
zero, then X is to be place in. If not, it would go down to B2. If not
again, then back up to C1.... then C2 right to a maximum of cell AE2.
it will eventually encounter a number greater than zero. After it
encounters is it would then go to the next set directly below which
would be B3 and B4 etc....

Here are a few examples (I have shortened the columns to 7 for
illustaration purposes only):

A * * *B * * * *C * * * * * * * * D * * * * * * * * E
F * * * * * * * * G * * * * * * * * H
X * * *0 * * * *0 * * * 0 * * * 0 * * * 2 * * * 3 * * * 0
* * * * *0 * * *0 * * * 0 * * * 0 * * * 0 * * * 0 * * * 1

* * * * *0 * * *0 * * * 0 * * * 0 * * * 0 * * * 0 * * * 0
X * * *0 * * * *0 * * * 1 * * * 0 * * * 0 * * * 1 * * * 0

X * * *0 * * * *0 * * * 0 * * * 0 * * * 0 * * * 0 * * * 1
* * * * *0 * * *0 * * * 0 * * * 0 * * * 0 * * * 0 * * * 0

X * * *0 * * * *3 * * * 0 * * * 3 * * * 1 * * * 0 * * * 0
* * * * *0 * * *2 * * * 0 * * * 1 * * * 0 * * * 0 * * * 0

* * * * *0 * * *0 * * * 0 * * * 0 * * * 0 * * * 0 * * * 0
*X * * 1 * * * *0 * * * 0 * * * 3 * * * 3 * * * 0 * * * 0

*X * * 0 * * * *0 * * * 1 * * * 1 * * * 1 * * * 0 * * * 0
* * * * *0 * * *0 * * * 0 * * * 0 * * * 0 * * * 0 * * * 0

Thanks in advance !


Insert a row at the top and put this in row2 and copy down
=IF(AND(COUNTIF(B2:H2,""&0),a1<"x"),"x","")