SUMPRODUCT with multiple values referenced

Darren_workforce

Board Regular
Joined
Oct 13, 2022
Messages
146
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have a sheet in which B4, E4, H4 or K4 could potentially have a specific job title (trainer, auditor, scheduler) and if the adjacent cell (A4, D4, G4 or J4) is not blank, we are to assume the data in Column A refers to the person occupying the job. It then would tally up the references of all four cells and generate the total number of filled positions. Using SUMPRODUCT for the first time, I got so far as to figure out a single reference formula

=SUMPRODUCT(--(B:B="trainer")*(A:A<>""))
=SUMPRODUCT(--(B:B="auditor")*(A:A<>""))
=SUMPRODUCT(--(B:B="scheduler")*(A:A<>""))

However, I'm not familiar with how to apply the logic to search for all 3 jobs titles in a single formula. I anticipate I will be expanding the formula for other jobs in other cell locations so I'd like to figure out how to combine these three.

Many thanks in advance for all help provided.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
if you are looking for "OR" any of those jobs this may work:
Excel Formula:
=SUMPRODUCT(
(--(B:B="trainer")*(A:A<>""))+
(--(B:B="auditor")*(A:A<>""))+
(--(B:B="scheduler")*(A:A<>""))+
)
 
Upvote 0
Solution
if you are looking for "OR" any of those jobs this may work:
Excel Formula:
=SUMPRODUCT(
(--(B:B="trainer")*(A:A<>""))+
(--(B:B="auditor")*(A:A<>""))+
(--(B:B="scheduler")*(A:A<>""))+
)
Thank you awoohaw! That did exactly what I needed!!
 
Upvote 0
My pleasure, I'm happy you found a solution at the Mr. Excel Forum.

Best Wishes!
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top