countif ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How would i count the number of times that two items are listed together in
the same row in a string of cells say b2 to g12.

"sell" and "stock" are togeter in rows D, E and F. Say - "Sell" is D3 and
"stock" is D11, "sell" is E5 and "stock" is E7, "sell" is F2 and "stock" is
F8. What fomula could i use that would give me an answer of 3?
 
Roger, sorry i meant listed in the same column not row and you only included
"sell" not sell and stock. Looks like a difficult solution to this one.
Appreciate your assistance
 
This worked on my test, but didnt have time to really beat it up. you would
need to add more countifs for all columns

=IF(AND(COUNTIF(D:D,"sell")>0,COUNTIF(D:D,"stock")>0),1,0)+IF(AND(COUNTIF(D:D,"sell")>0,COUNTIF(E:E,"stock")>0),1,0)+IF(AND(COUNTIF(E:E,"sell")>0,COUNTIF(E:E,"stock")>0),1,0)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top