Help in choosing formula

BurkeDad

New Member
Joined
Jul 8, 2011
Messages
24
Need some help in what ype of formula I need to use to obtain the answer I need.

In column A I have a list of all the facilities in our organization. In column C I have the type of employee (fulltime, volunteer, contractor, etc....) in the facility. In a cell, I need to create a formula that returns the number of fulltime workers in each facility. I wrote a sumproduct formula - which reads - =sumproduct(--(A$3$:A$1678$=n$5$, C$3$:C$1678$=n$2$)). N5 is the facility number pull from a drop down list and n2 is the type of employee (designated by a number (1, 2, 3, 4, etc....). When I execute the formula, I get #value as the error.

What am I doing wrong - or should I be using a different formula all together?
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Need some help in what ype of formula I need to use to obtain the answer I need.

In column A I have a list of all the facilities in our organization. In column C I have the type of employee (fulltime, volunteer, contractor, etc....) in the facility. In a cell, I need to create a formula that returns the number of fulltime workers in each facility. I wrote a sumproduct formula - which reads - =sumproduct(--(A$3$:A$1678$=n$5$, C$3$:C$1678$=n$2$)). N5 is the facility number pull from a drop down list and n2 is the type of employee (designated by a number (1, 2, 3, 4, etc....). When I execute the formula, I get #value as the error.

What am I doing wrong - or should I be using a different formula all together?
Try it like this...

=SUMPRODUCT(--($A$3:$A$1678=$N$5),--($C$3:$C$1678=$N$2))

If you're using Excel 2007 or later...

=COUNTIFS($A$3:$A$1678,$N$5,$C$3:$C$1678,$N$2)
 
Upvote 0
Okay, put the -- and () in and it now returns a value of "0". Now, N5 is a formula (=left(n4,4) that takes the value of the pulldown selection and breaks out a certain part of the facility number. And when I change the "left" formula into an hard keyed value, the formula wrrks. What gives?
 
Upvote 0
If N5 is meant to be a number try

=SUMPRODUCT(--(A$3:A$1678=N$5+0), --(C$3:C$1678=N$2))
 
Upvote 0

Forum statistics

Threads
1,224,552
Messages
6,179,486
Members
452,917
Latest member
MrsMSalt

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