View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
DM
 
Posts: n/a
Default Formula to look up a column and paste results in another colum

Is it possible to add a second variable to the formula to also look for
"dog1" at the same time? How do I do that? Something like
=$D$2-COUNTIF($C$3:C3, "dog"; "dog1")

Thank you!

"vezerid" wrote:

I am assuming 100 is in D2 and 99 is in D3. Then the formula for D3 and
down is:

=$D$2-COUNTIF($C$3:C3, "dog")

Alternatively, if you have the words dog, dog1, cat, cat1 etc in D1, E1
etc, you can use the following formula in D3 and copy accross and down:

=$D$2-COUNTIF($C$3:C3, D$1)

HTH
Kostis Vezerides