#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Sumif or Sumproduct?

Hello,

If I have 3 columns:
NAME LOCATION YEARS IN COMPANY
Doe, John Franktown 1
Doe, Joan Franktown 2
Jones, Jessica Jacobs 2
Bradley, John Jacobs 3
Haften, Jose Kenton 3
Justin, Jasmine Liberty 4
Prok, Tealer Liberty NP

I want to to add the number of 1st, 2nd and 3rd year employees (only) for
each location. What formula do I use? I am currently only able to add 2
criteria to one forumla: =SUMPRODUCT(((F4:F25)="1st")+((F4:F25)="2nd")).
When I try to add another criterion, "3rd" I receive an error. Please help~

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default Sumif or Sumproduct?

=SUMPRODUCT(--(E4:E25="Location"),--(F4:F25=1),--(F4:F25<=3))
--
HTH,
Barb Reinhardt



"Helpless in Colorado" wrote:

Hello,

If I have 3 columns:
NAME LOCATION YEARS IN COMPANY
Doe, John Franktown 1
Doe, Joan Franktown 2
Jones, Jessica Jacobs 2
Bradley, John Jacobs 3
Haften, Jose Kenton 3
Justin, Jasmine Liberty 4
Prok, Tealer Liberty NP

I want to to add the number of 1st, 2nd and 3rd year employees (only) for
each location. What formula do I use? I am currently only able to add 2
criteria to one forumla: =SUMPRODUCT(((F4:F25)="1st")+((F4:F25)="2nd")).
When I try to add another criterion, "3rd" I receive an error. Please help~

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default Sumif or Sumproduct?

I'm unclear as to what you want. I see 1, 2, 3, 4 and NP, yet you're testing
for "1st", "2nd" and want to test for "3rd". Do you want the answer for the
data in your message to be 5? If range contains numbers 1, 2, 2, 3, 3, 4, NP
then:

=COUNTIF(range,"1")+COUNTIF(range,"2")+COUNTIF(ran ge,"3")

Tyro

"Helpless in Colorado" <Helpless in
wrote in message ...
Hello,

If I have 3 columns:
NAME LOCATION YEARS IN COMPANY
Doe, John Franktown 1
Doe, Joan Franktown 2
Jones, Jessica Jacobs 2
Bradley, John Jacobs 3
Haften, Jose Kenton 3
Justin, Jasmine Liberty 4
Prok, Tealer Liberty NP

I want to to add the number of 1st, 2nd and 3rd year employees (only) for
each location. What formula do I use? I am currently only able to add 2
criteria to one forumla: =SUMPRODUCT(((F4:F25)="1st")+((F4:F25)="2nd")).
When I try to add another criterion, "3rd" I receive an error. Please
help~



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default Sumif or Sumproduct?

=COUNTIF(D11:D16,1)+COUNTIF(D11:D16,2)+COUNTIF(D11 :D16,3)

D11:D16 is the area that has the values for years in company. You may want
to name that range by selecting that are, then click up in the name area,
then type years and hit enter. After doing that, you can just type years
instead of D11:D16 when entering the formula.

"Helpless in Colorado" wrote:

Hello,

If I have 3 columns:
NAME LOCATION YEARS IN COMPANY
Doe, John Franktown 1
Doe, Joan Franktown 2
Jones, Jessica Jacobs 2
Bradley, John Jacobs 3
Haften, Jose Kenton 3
Justin, Jasmine Liberty 4
Prok, Tealer Liberty NP

I want to to add the number of 1st, 2nd and 3rd year employees (only) for
each location. What formula do I use? I am currently only able to add 2
criteria to one forumla: =SUMPRODUCT(((F4:F25)="1st")+((F4:F25)="2nd")).
When I try to add another criterion, "3rd" I receive an error. Please help~

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default Sumif or Sumproduct?

If you need a subtotal for each location, that will take a little more work.
Do you need subtotals?

"Helpless in Colorado" wrote:

Hello,

If I have 3 columns:
NAME LOCATION YEARS IN COMPANY
Doe, John Franktown 1
Doe, Joan Franktown 2
Jones, Jessica Jacobs 2
Bradley, John Jacobs 3
Haften, Jose Kenton 3
Justin, Jasmine Liberty 4
Prok, Tealer Liberty NP

I want to to add the number of 1st, 2nd and 3rd year employees (only) for
each location. What formula do I use? I am currently only able to add 2
criteria to one forumla: =SUMPRODUCT(((F4:F25)="1st")+((F4:F25)="2nd")).
When I try to add another criterion, "3rd" I receive an error. Please help~



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Sumif or Sumproduct?

Barb,

That is returning a "0" value. What if I take out the location piece. Can
you tell me how to add up the 3 criteria (1, 2, 3) in one forumula? I have
appox 1964 rows in this spreadsheet with over 45 locations.

"Barb Reinhardt" wrote:

=SUMPRODUCT(--(E4:E25="Location"),--(F4:F25=1),--(F4:F25<=3))
--
HTH,
Barb Reinhardt



"Helpless in Colorado" wrote:

Hello,

If I have 3 columns:
NAME LOCATION YEARS IN COMPANY
Doe, John Franktown 1
Doe, Joan Franktown 2
Jones, Jessica Jacobs 2
Bradley, John Jacobs 3
Haften, Jose Kenton 3
Justin, Jasmine Liberty 4
Prok, Tealer Liberty NP

I want to to add the number of 1st, 2nd and 3rd year employees (only) for
each location. What formula do I use? I am currently only able to add 2
criteria to one forumla: =SUMPRODUCT(((F4:F25)="1st")+((F4:F25)="2nd")).
When I try to add another criterion, "3rd" I receive an error. Please help~

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Sumif or Sumproduct?

Brad that worked!!! Thank you so much.

"Brad Vogt" wrote:

=COUNTIF(D11:D16,1)+COUNTIF(D11:D16,2)+COUNTIF(D11 :D16,3)

D11:D16 is the area that has the values for years in company. You may want
to name that range by selecting that are, then click up in the name area,
then type years and hit enter. After doing that, you can just type years
instead of D11:D16 when entering the formula.

"Helpless in Colorado" wrote:

Hello,

If I have 3 columns:
NAME LOCATION YEARS IN COMPANY
Doe, John Franktown 1
Doe, Joan Franktown 2
Jones, Jessica Jacobs 2
Bradley, John Jacobs 3
Haften, Jose Kenton 3
Justin, Jasmine Liberty 4
Prok, Tealer Liberty NP

I want to to add the number of 1st, 2nd and 3rd year employees (only) for
each location. What formula do I use? I am currently only able to add 2
criteria to one forumla: =SUMPRODUCT(((F4:F25)="1st")+((F4:F25)="2nd")).
When I try to add another criterion, "3rd" I receive an error. Please help~

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Sumif or Sumproduct?

Hi Tyro,

That's the problem. I only want to add 1, 2, 3 employees not 4 and NP. I
need to add the 1, 2 and 3 employees at each location. I want the data to
answer the sum of the 1st ,2nd and 3rd year employees in each location.

"Tyro" wrote:

I'm unclear as to what you want. I see 1, 2, 3, 4 and NP, yet you're testing
for "1st", "2nd" and want to test for "3rd". Do you want the answer for the
data in your message to be 5? If range contains numbers 1, 2, 2, 3, 3, 4, NP
then:

=COUNTIF(range,"1")+COUNTIF(range,"2")+COUNTIF(ran ge,"3")

Tyro

"Helpless in Colorado" <Helpless in
wrote in message ...
Hello,

If I have 3 columns:
NAME LOCATION YEARS IN COMPANY
Doe, John Franktown 1
Doe, Joan Franktown 2
Jones, Jessica Jacobs 2
Bradley, John Jacobs 3
Haften, Jose Kenton 3
Justin, Jasmine Liberty 4
Prok, Tealer Liberty NP

I want to to add the number of 1st, 2nd and 3rd year employees (only) for
each location. What formula do I use? I am currently only able to add 2
criteria to one forumla: =SUMPRODUCT(((F4:F25)="1st")+((F4:F25)="2nd")).
When I try to add another criterion, "3rd" I receive an error. Please
help~




  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Sumif or Sumproduct?

I do not need subtotals. You hae saved me a lot of time! I really
appreciate it!

"Brad Vogt" wrote:

If you need a subtotal for each location, that will take a little more work.
Do you need subtotals?

"Helpless in Colorado" wrote:

Hello,

If I have 3 columns:
NAME LOCATION YEARS IN COMPANY
Doe, John Franktown 1
Doe, Joan Franktown 2
Jones, Jessica Jacobs 2
Bradley, John Jacobs 3
Haften, Jose Kenton 3
Justin, Jasmine Liberty 4
Prok, Tealer Liberty NP

I want to to add the number of 1st, 2nd and 3rd year employees (only) for
each location. What formula do I use? I am currently only able to add 2
criteria to one forumla: =SUMPRODUCT(((F4:F25)="1st")+((F4:F25)="2nd")).
When I try to add another criterion, "3rd" I receive an error. Please help~

  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,091
Default Sumif or Sumproduct?

You have to replace "Location" with the actual location - ie "Franktown" or
"Jacobs" in the formula.

Tyro

"Helpless in Colorado" wrote
in message ...
Barb,

That is returning a "0" value. What if I take out the location piece. Can
you tell me how to add up the 3 criteria (1, 2, 3) in one forumula? I
have
appox 1964 rows in this spreadsheet with over 45 locations.

"Barb Reinhardt" wrote:

=SUMPRODUCT(--(E4:E25="Location"),--(F4:F25=1),--(F4:F25<=3))
--
HTH,
Barb Reinhardt



"Helpless in Colorado" wrote:

Hello,

If I have 3 columns:
NAME LOCATION YEARS IN COMPANY
Doe, John Franktown 1
Doe, Joan Franktown 2
Jones, Jessica Jacobs 2
Bradley, John Jacobs 3
Haften, Jose Kenton 3
Justin, Jasmine Liberty 4
Prok, Tealer Liberty NP

I want to to add the number of 1st, 2nd and 3rd year employees (only)
for
each location. What formula do I use? I am currently only able to add
2
criteria to one forumla:
=SUMPRODUCT(((F4:F25)="1st")+((F4:F25)="2nd")).
When I try to add another criterion, "3rd" I receive an error. Please
help~





  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 80
Default Sumif or Sumproduct?

Here is your answer, in 1 formula for 3 locations, AAA, BBB, & CCC.

If you have more locations, simply "ADDON".

=SUMPRODUCT(--(B7:B15="AAA"),--(C7:C15=1),--(C7:C15<=3))+SUMPRODUCT(--(B7:B15="BBB"),--(C7:C15=1),--(C7:C15<=3))+SUMPRODUCT(--(B7:B15="CCC"),--(C7:C15=1),--(C7:C15<=3))

That's All.

FLKulchar
"Helpless in Colorado" wrote
in message ...
I do not need subtotals. You hae saved me a lot of time! I really
appreciate it!

"Brad Vogt" wrote:

If you need a subtotal for each location, that will take a little more
work.
Do you need subtotals?

"Helpless in Colorado" wrote:

Hello,

If I have 3 columns:
NAME LOCATION YEARS IN COMPANY
Doe, John Franktown 1
Doe, Joan Franktown 2
Jones, Jessica Jacobs 2
Bradley, John Jacobs 3
Haften, Jose Kenton 3
Justin, Jasmine Liberty 4
Prok, Tealer Liberty NP

I want to to add the number of 1st, 2nd and 3rd year employees (only)
for
each location. What formula do I use? I am currently only able to add
2
criteria to one forumla:
=SUMPRODUCT(((F4:F25)="1st")+((F4:F25)="2nd")).
When I try to add another criterion, "3rd" I receive an error. Please
help~



  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Sumif or Sumproduct?

Does the same thing and saves a few keystrokes:

=SUM(COUNTIF(D11:D16,{1,2,3}))


--
Biff
Microsoft Excel MVP


"Brad Vogt" wrote in message
...
=COUNTIF(D11:D16,1)+COUNTIF(D11:D16,2)+COUNTIF(D11 :D16,3)

D11:D16 is the area that has the values for years in company. You may
want
to name that range by selecting that are, then click up in the name area,
then type years and hit enter. After doing that, you can just type years
instead of D11:D16 when entering the formula.

"Helpless in Colorado" wrote:

Hello,

If I have 3 columns:
NAME LOCATION YEARS IN COMPANY
Doe, John Franktown 1
Doe, Joan Franktown 2
Jones, Jessica Jacobs 2
Bradley, John Jacobs 3
Haften, Jose Kenton 3
Justin, Jasmine Liberty 4
Prok, Tealer Liberty NP

I want to to add the number of 1st, 2nd and 3rd year employees (only) for
each location. What formula do I use? I am currently only able to add 2
criteria to one forumla: =SUMPRODUCT(((F4:F25)="1st")+((F4:F25)="2nd")).
When I try to add another criterion, "3rd" I receive an error. Please
help~



  #13   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default Sumif or Sumproduct?

Glad that it helped!

"Helpless in Colorado" wrote:

Brad that worked!!! Thank you so much.

"Brad Vogt" wrote:

=COUNTIF(D11:D16,1)+COUNTIF(D11:D16,2)+COUNTIF(D11 :D16,3)

D11:D16 is the area that has the values for years in company. You may want
to name that range by selecting that are, then click up in the name area,
then type years and hit enter. After doing that, you can just type years
instead of D11:D16 when entering the formula.

"Helpless in Colorado" wrote:

Hello,

If I have 3 columns:
NAME LOCATION YEARS IN COMPANY
Doe, John Franktown 1
Doe, Joan Franktown 2
Jones, Jessica Jacobs 2
Bradley, John Jacobs 3
Haften, Jose Kenton 3
Justin, Jasmine Liberty 4
Prok, Tealer Liberty NP

I want to to add the number of 1st, 2nd and 3rd year employees (only) for
each location. What formula do I use? I am currently only able to add 2
criteria to one forumla: =SUMPRODUCT(((F4:F25)="1st")+((F4:F25)="2nd")).
When I try to add another criterion, "3rd" I receive an error. Please help~

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
sumproduct? sumif(sumproduct)? David Excel Worksheet Functions 3 July 13th 07 07:06 PM
sumif or sumproduct? ronnomad Excel Worksheet Functions 5 August 7th 06 10:13 PM
HELP!!!! sumif or sumproduct ??? :( Wally Excel Worksheet Functions 0 July 31st 05 01:43 PM
sumif vs sumproduct ww Excel Worksheet Functions 2 April 5th 05 02:19 AM
Sumif not Sumproduct David Excel Worksheet Functions 4 December 8th 04 11:39 AM


All times are GMT +1. The time now is 02:30 AM.

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

About Us

"It's about Microsoft Excel"