Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default how to sum "unique" samples

Given the following data in a spreadsheet, is it possible to sum all the red
pencils, all the blue pencils, and all the green pencils if the number of
lots for each color varies? I'm hoping there's a way to sum samples based on
the criteria "unique".


Column 1 Column 2

color: # in each lot:
red 200
red 100
red 50
blue 350
green 200
green 210
green 75

--
Sometimes to have a little good luck is the most brilliant plan.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default how to sum "unique" samples

Assuming colors are in column A and quantities are in column B, we can use
the SUMIF() worksheet function like this:

=SUMIF(A2:A8,"red",B2:B8)

or if you want, you can enter a color into another cell, say C1 and use the
formula like this:
=SUMIF(A2:A8,C1,B2:B8)


"LindaJane" wrote:

Given the following data in a spreadsheet, is it possible to sum all the red
pencils, all the blue pencils, and all the green pencils if the number of
lots for each color varies? I'm hoping there's a way to sum samples based on
the criteria "unique".


Column 1 Column 2

color: # in each lot:
red 200
red 100
red 50
blue 350
green 200
green 210
green 75

--
Sometimes to have a little good luck is the most brilliant plan.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default how to sum "unique" samples

hi
=sumif(A2:A8,"red",B2:B8)

or

=sumproduct((A1:A8="red")*(B2:B8))

you'll need a formula for each color(criteria)

Regards
FSt1

"LindaJane" wrote:

Given the following data in a spreadsheet, is it possible to sum all the red
pencils, all the blue pencils, and all the green pencils if the number of
lots for each color varies? I'm hoping there's a way to sum samples based on
the criteria "unique".


Column 1 Column 2

color: # in each lot:
red 200
red 100
red 50
blue 350
green 200
green 210
green 75

--
Sometimes to have a little good luck is the most brilliant plan.

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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
"--" (was "DCOUNT Unique Values") Wilba Excel Worksheet Functions 2 November 3rd 07 12:50 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 12:23 AM.

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"