View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Lupe Lupe is offline
external usenet poster
 
Posts: 30
Default Can I use OR function here

Bernard, Thanks for taking the time to answer my question. Appreciate it.
What you gave me for Q2 works very good. But for Q1 it is ignoring the 2nd
criteria. The formula has to check also on the criterias I have in column B
which changes with each row.
Example: staff and labor are criterias in column B. It has to check how many
persons in department starting with"ex","ia","la","rp" are staff and how many
are labor.
=SUMPRODUCT(--(LEFT(downloaded!$I$2:$I$991,2)={"ex","ia","la","r p"}))--(downloaded!$J$2:$J$991=$B2)
Regards, Lupe
"Bernard Liengme" wrote:

Q1: In
=SUMPRODUCT(--(LEFT(downloaded!$I$2:$I$991,2)="ex"),--(downloaded!$J$2:$J$991=$B3))
use --(LEFT(downloaded!$I$2:$I$991,2)={"ex","ia","la","r p"})

Q2:=SUMPRODUCT(--(LEFT(downloaded!$I$2:$I$991,1)="o"),--(downloaded!$I$2:$I$991<"opsb"),--(downloaded!$J$2:$J$991=$B2))

best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Lupe" wrote in message
...
I have the formula below but now need to check in this same formula for two
to three additional abbreviation. I need it to check on ex, ia, la and rp,
they need to be counted together.
=SUMPRODUCT(--(LEFT(downloaded!$I$2:$I$991,2)="ex"),--(downloaded!$J$2:$J$991=$B3))
In another column I also need to exclude one abbreviation. I need to
exclude
on abbreviation which in full is OPSB.
=SUMPRODUCT(--(LEFT(downloaded!$I$2:$I$991,1)="o"),--(downloaded!$J$2:$J$991=$B2))
Can someone help me plse.
Regards, Lupe