Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IF AND OR COUNTIF help needed

Status
Not open for further replies.

knifey

Technical User
Nov 14, 2006
180
GB
Hi,
I'm trying (without much success) to build a rather complex formula. The first part marked in green is working.

What I've got so far:
=IF(AND(master!C3:C2002="Rx",master!Q3:Q2002="NA"),COUNTIFS(master!C3:C2002,"Rx",master!Q3:Q2002,"NA",master!N3:N2002,""),IF(OR(AND(master!C3:C2002="Rx",master!Q3:Q2002<>"NA",master!N3:N2002,""),AND(master!C3:C2002="Rx",master!Q3:Q2002<>"NA",master!R3:R2002,"")),COUNTIF(master!R3:R2002,"")))

What this should be doing (in plain English):
IF column C = "Rx" AND column Q = "NA" THEN
Count blanks in Column N
ELSEIF column C = "Rx" AND column Q <> "NA" AND column N = "" OR _
column C = "Rx" AND column Q <> "NA" AND column R = "" THEN
Count blanks in Column N or R
ENDIF

I could do this quite easily in VBA but my new boos is a formula freak!
Any advice or pointers would be much appreciated.

K
 
Please, for excel formula questions, ask here:
forum68

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top