View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default Help with Formula

The first part looks like it should be

=IF(AB16="",0,IF(AND(COUNTIF($AB$16:$AB$30,AB16)=1 ,B16="lot",C16="Y")

now the question is, what do you want if the IF(AND part is TRUE

If the countif part is 1, B16 equals lot and C16 is Y, what do you want as a
result? If you want the result of the countif you might as well put 1 there
since that is the condition, so maybe


=IF(AB16="",0,IF(AND(COUNTIF($AB$16:$AB$30,AB16)=1 ,B16="lot",C16="Y"),1,1/COUNTIF($AB$16:$AB$30,AB16)))


--
Regards,

Peo Sjoblom


"Tanya" wrote in message
...
Hi all,

I am getting so confused with this formula that my head is aching can
anyone
help?
=IF((AB16="",0,AND(COUNTIF($AB$16:$AB$30,AB16)=1,B 16='lot',
C16='Y')),COUNTIF($AB$16:$AB$30,AB16),1/COUNTIF($AB$16:$AB$30,AB16)))

I am guessing that i dont have the syntax correct or the brackets in the
correct place, please let me know if you need further explanation although
im
just as confused.

Thanks Tanya