Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
redneck joe
 
Posts: n/a
Default sumproduct - reading a variable value


Need help on this one, not a lot of time to try to learn it on my own:


I have a list of employees in column A

I have list of various job codes in column C with assigned employee
number associated with that job code in column D,

in range of row 5 through 960.



I need the formula to read the employee number in A1,
then search for that employee number in D5:D960,
then count the number of specific job codes in the associated column
C5:C960


Employee 7004 did xx number of TC, SC, NC, DM, etc.



Similar to this formula, but the “7004” is a variable that needs to be
read from a cell rather be an absolute, and the “TC” needs to read that
and about 10 more codes


=SUMPRODUCT(($D$5:$D$960={"7004"})*($C$5:$C$960= "TC"))



thanks for saving me, again….

j


--
redneck joe


------------------------------------------------------------------------
redneck joe's Profile: http://www.excelforum.com/member.php...o&userid=32570
View this thread: http://www.excelforum.com/showthread...hreadid=545148

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default sumproduct - reading a variable value

Isn't it just

=COUNTIF($D$5:$D$960,A1)

--
HTH

Bob Phillips

(replace xxxx in email address with googlemail if mailing direct)

"redneck joe"
wrote in message
...

Need help on this one, not a lot of time to try to learn it on my own:


I have a list of employees in column A

I have list of various job codes in column C with assigned employee
number associated with that job code in column D,

in range of row 5 through 960.



I need the formula to read the employee number in A1,
then search for that employee number in D5:D960,
then count the number of specific job codes in the associated column
C5:C960


Employee 7004 did xx number of TC, SC, NC, DM, etc.



Similar to this formula, but the "7004" is a variable that needs to be
read from a cell rather be an absolute, and the "TC" needs to read that
and about 10 more codes


=SUMPRODUCT(($D$5:$D$960={"7004"})*($C$5:$C$960= "TC"))



thanks for saving me, again..

j


--
redneck joe


------------------------------------------------------------------------
redneck joe's Profile:

http://www.excelforum.com/member.php...o&userid=32570
View this thread: http://www.excelforum.com/showthread...hreadid=545148



  #3   Report Post  
Posted to microsoft.public.excel.misc
Miguel Zapico
 
Posts: n/a
Default sumproduct - reading a variable value

This one is bit ugly, but it can work for multiple job codes:
=SUMPRODUCT(--($D$5:$D$960=$A$1),--(($C$5:$C$960= "TC")+($C$5:$C$960= "SC")))
Adding more pieces of $C$5:$C$960="XX" will add those rows to the count.

Hope this helps,
Miguel.

"redneck joe" wrote:


Need help on this one, not a lot of time to try to learn it on my own:


I have a list of employees in column A

I have list of various job codes in column C with assigned employee
number associated with that job code in column D,

in range of row 5 through 960.



I need the formula to read the employee number in A1,
then search for that employee number in D5:D960,
then count the number of specific job codes in the associated column
C5:C960


Employee 7004 did xx number of TC, SC, NC, DM, etc.



Similar to this formula, but the €ś7004€ť is a variable that needs to be
read from a cell rather be an absolute, and the €śTC€ť needs to read that
and about 10 more codes


=SUMPRODUCT(($D$5:$D$960={"7004"})*($C$5:$C$960= "TC"))



thanks for saving me, again€¦.

j


--
redneck joe


------------------------------------------------------------------------
redneck joe's Profile: http://www.excelforum.com/member.php...o&userid=32570
View this thread: http://www.excelforum.com/showthread...hreadid=545148


  #4   Report Post  
Posted to microsoft.public.excel.misc
redneck joe
 
Posts: n/a
Default sumproduct - reading a variable value


ugly is as ugly does. Both seem to be working.


Bob - I actually needed that one too, although slightly different
reason.


all beautiful to me.

Thanks guys


--
redneck joe


------------------------------------------------------------------------
redneck joe's Profile: http://www.excelforum.com/member.php...o&userid=32570
View this thread: http://www.excelforum.com/showthread...hreadid=545148

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Aling multiple sets of data by header column MarkusO Excel Discussion (Misc queries) 2 April 12th 06 07:29 PM
Reading Data from another workbook... depending on variable in a cell? Rob Moyle Excel Discussion (Misc queries) 4 March 13th 06 04:21 PM
variable height variable width stacked bar charts ambthiru Charts and Charting in Excel 3 January 18th 06 11:41 PM
Sumproduct function not working Scott Summerlin Excel Worksheet Functions 12 December 4th 04 05:15 AM
adding two sumproduct formulas together ski2004_2005 Excel Worksheet Functions 1 November 12th 04 09:08 PM


All times are GMT +1. The time now is 07:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"