View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ryan Poth
 
Posts: n/a
Default How to increase counter based on values in 2 different cells

Not sure if this is *precisely* what you need, but you could try this formula:

=SUM((X1:X65535=1)*(Y1:Y65535=50))

This must be array-entered (CTRL-SHIFT-ENTER)

Logically, I would think that this could be simplified to:

=SUM((X:X=1)*(Y:Y=50))

but I get #NUM! as a result when I do that. I'm not sure why.

HTH,
Ryan

"txlonghorn1989" wrote:

I want to check 2 cells (2 different columns) for a worksheet.

Easy to do programmatically but not familiar with spreadsheet
functions. Here's what I want to do in psuedo code...

For every row (with data) in a worksheet
If column X cell = 1 AND column Y cell = 50
ctr = ctr + 1

Any help would be appreciated.

Mike