Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default sum using text and numbers as criteria

I hope someone can assist with this......

I have a spreadsheet with column A containing words, and column b containing
numbers

A B C D
(TOTAL)
JOHN $123.00 GARY
GARY $456.00 PAUL
PAUL $789.00 JOHN
JOHN $345.00
GARY $567.00
PAUL $678.00

I need a formula for column D to add totals for each name. I have tried
SUMIF(A2:A7,"JOHN",B2:B7) but it doesn't add the amounts, only the first
instance of JOHN is displayed by the formula. I have tried various other
formulas found here in this discussion group but the SUMIF above is about the
closest I've come to any joy, all the others display an error message.

any suggestions would be greatly appreciated, this is really doing my head in!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default sum using text and numbers as criteria

Maybe you have hidden characters, assume the distinct name list is in C2:C4,

in D2 put

=SUMIF($A$2:$A$7,C2,$B$2:$B$7)

copy down to D4

now if that only give you 123 for John try this

=SUMIF($A$2:$A$7,"*"&C2&"*",$B$2:$B$7)

and copy down



--

Regards,

Peo Sjoblom



"sevi61" wrote in message
...
I hope someone can assist with this......

I have a spreadsheet with column A containing words, and column b
containing
numbers

A B C D
(TOTAL)
JOHN $123.00 GARY
GARY $456.00 PAUL
PAUL $789.00 JOHN
JOHN $345.00
GARY $567.00
PAUL $678.00

I need a formula for column D to add totals for each name. I have tried
SUMIF(A2:A7,"JOHN",B2:B7) but it doesn't add the amounts, only the first
instance of JOHN is displayed by the formula. I have tried various other
formulas found here in this discussion group but the SUMIF above is about
the
closest I've come to any joy, all the others display an error message.

any suggestions would be greatly appreciated, this is really doing my head
in!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default sum using text and numbers as criteria

only the first instance of JOHN is displayed by the formula

What exactly does that mean? Do you mean that this formula:

SUMIF(A2:A7,"JOHN",B2:B7)


Returns only 123 when it should return 468?

If you have the unique names listed in the range of cells C2:C4 then you
need to make some of your references absolute:

=SUMIF(A$2:A$7,C2,B$2:B$7)

The $ signs will keep the row references from changing when you copy the
formula.

--
Biff
Microsoft Excel MVP


"sevi61" wrote in message
...
I hope someone can assist with this......

I have a spreadsheet with column A containing words, and column b
containing
numbers

A B C D
(TOTAL)
JOHN $123.00 GARY
GARY $456.00 PAUL
PAUL $789.00 JOHN
JOHN $345.00
GARY $567.00
PAUL $678.00

I need a formula for column D to add totals for each name. I have tried
SUMIF(A2:A7,"JOHN",B2:B7) but it doesn't add the amounts, only the first
instance of JOHN is displayed by the formula. I have tried various other
formulas found here in this discussion group but the SUMIF above is about
the
closest I've come to any joy, all the others display an error message.

any suggestions would be greatly appreciated, this is really doing my head
in!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default sum using text and numbers as criteria

thanks for all your help, this has helped me no end


"sevi61" wrote:

I hope someone can assist with this......

I have a spreadsheet with column A containing words, and column b containing
numbers

A B C D
(TOTAL)
JOHN $123.00 GARY
GARY $456.00 PAUL
PAUL $789.00 JOHN
JOHN $345.00
GARY $567.00
PAUL $678.00

I need a formula for column D to add totals for each name. I have tried
SUMIF(A2:A7,"JOHN",B2:B7) but it doesn't add the amounts, only the first
instance of JOHN is displayed by the formula. I have tried various other
formulas found here in this discussion group but the SUMIF above is about the
closest I've come to any joy, all the others display an error message.

any suggestions would be greatly appreciated, this is really doing my head in!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default sum using text and numbers as criteria

You're welcome. Thanks for thr feedback!

--
Biff
Microsoft Excel MVP


"sevi61" wrote in message
...
thanks for all your help, this has helped me no end


"sevi61" wrote:

I hope someone can assist with this......

I have a spreadsheet with column A containing words, and column b
containing
numbers

A B C D
(TOTAL)
JOHN $123.00 GARY
GARY $456.00 PAUL
PAUL $789.00 JOHN
JOHN $345.00
GARY $567.00
PAUL $678.00

I need a formula for column D to add totals for each name. I have tried
SUMIF(A2:A7,"JOHN",B2:B7) but it doesn't add the amounts, only the first
instance of JOHN is displayed by the formula. I have tried various other
formulas found here in this discussion group but the SUMIF above is about
the
closest I've come to any joy, all the others display an error message.

any suggestions would be greatly appreciated, this is really doing my
head in!



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
How to add numbers using criteria from another column CB Excel Discussion (Misc queries) 1 August 3rd 07 11:02 PM
Sum numbers based on specified criteria R.Miller Excel Worksheet Functions 5 June 18th 07 09:50 PM
sum numbers under or over a criteria? Dan B[_2_] Excel Worksheet Functions 4 March 3rd 07 01:57 AM
add numbers if they meet criteria...? Dan B Excel Worksheet Functions 2 January 31st 07 11:47 PM
Convert numbers stored as text to numbers Excel 2000 Darlene Excel Discussion (Misc queries) 6 January 31st 06 08:04 PM


All times are GMT +1. The time now is 02:49 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"