If cell has one value, go to adjacent cell and count

If cell has one value, go to adjacent cell and count

Post by TG9zdCBpbi » Wed, 08 Mar 2006 04:59:07


I have an imported text file (roughly 30,000lines). What I need is to see if
a column has the value "SAUR" and if so, count the columns with "S" in the
next 7 rows below it and 2 columns to the right.
 
 
 

If cell has one value, go to adjacent cell and count

Post by Q2hyaXMgTW » Wed, 08 Mar 2006 06:10:30

Hi,

Try,

=IF(RC[-3]="SAUR",COUNTIF(R[1]C[-1]:R[7]C[-1],"S"),0)

I set this up with R1C1 ref style on & put my formula in column 4. My dummy
data was in col 1 (SAUR, <>SAUR) & column 3 (S & <>S). You will need to tweak
if you can't put the formula there.

Regards,

Chris.

--
Chris Marlow
MCSD.NET, Microsoft Office XP Master

 
 
 

If cell has one value, go to adjacent cell and count

Post by TG9zdCBpbi » Wed, 08 Mar 2006 07:39:05

Chris,

When I paste this into the worksheet, nothing happens. Am I doing something
wrong? Do I run a macro and insert there?

Thanks