Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
GD GD is offline
external usenet poster
 
Posts: 83
Default Adding numbers in a range

Hello,
I am wondering if there is an easy way to do this. If excel supports with a
method.

If I have a range. Maybe A1 to B20
Lets say column A has a word in it. And column B has numbers.
So maybe like this

aaa,4
aaa,7
bbb,9
bbb,3
bbb,4
ccc,4
ddd,5


Is there a way to add up all the bbb numbers? Using this range?

thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding numbers in a range


gd;221682 Wrote:
Hello,
I am wondering if there is an easy way to do this. If excel supports
with a
method.

If I have a range. Maybe A1 to B20
Lets say column A has a word in it. And column B has numbers.
So maybe like this

aaa,4
aaa,7
bbb,9
bbb,3
bbb,4
ccc,4
ddd,5


Is there a way to add up all the bbb numbers? Using this range?

thanks


Have a look at the SUMIF function.
Check XL's help for syntax


--
Pecoflyer

Cheers -
*'Membership is free' (http://www.thecodecage.com)* & allows file
upload -faster and better answers

*Adding your XL version* to your post helps finding solution faster
------------------------------------------------------------------------
Pecoflyer's Profile: http://www.thecodecage.com/forumz/member.php?userid=14
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=61118

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,276
Default Adding numbers in a range

Hi,
Try
=SUMPRODUCT(--(A:A="bbb"),B:B)

I recommend to enter bbb or aaa in a cell and then refer to that cell in
your formula for example cell c1

=SUMPRODUCT(--(A:A=$c$1$),B:B)

If you are not using excel 2007 give a range to the parameters

=SUMPRODUCT(--(A1:A1000="bbb"),B1:B1000)

If this was helpful please say yes. thanks

"gd" wrote:

Hello,
I am wondering if there is an easy way to do this. If excel supports with a
method.

If I have a range. Maybe A1 to B20
Lets say column A has a word in it. And column B has numbers.
So maybe like this

aaa,4
aaa,7
bbb,9
bbb,3
bbb,4
ccc,4
ddd,5


Is there a way to add up all the bbb numbers? Using this range?

thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,722
Default Adding numbers in a range

Indeed, there is. For more info, try XL's help file on SUMIF (or COUNTIF)

=SUMIF(A1:A20,"bbb",B1:B20)
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"gd" wrote:

Hello,
I am wondering if there is an easy way to do this. If excel supports with a
method.

If I have a range. Maybe A1 to B20
Lets say column A has a word in it. And column B has numbers.
So maybe like this

aaa,4
aaa,7
bbb,9
bbb,3
bbb,4
ccc,4
ddd,5


Is there a way to add up all the bbb numbers? Using this range?

thanks

  #5   Report Post  
Posted to microsoft.public.excel.programming
GD GD is offline
external usenet poster
 
Posts: 83
Default Adding numbers in a range

Thanks all
I will give it a try

"gd" wrote:

Hello,
I am wondering if there is an easy way to do this. If excel supports with a
method.

If I have a range. Maybe A1 to B20
Lets say column A has a word in it. And column B has numbers.
So maybe like this

aaa,4
aaa,7
bbb,9
bbb,3
bbb,4
ccc,4
ddd,5


Is there a way to add up all the bbb numbers? Using this range?

thanks

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
Adding numbers based on Range Carla Excel Worksheet Functions 2 June 18th 09 03:25 PM
Adding variable range of numbers mwavra Excel Worksheet Functions 6 October 16th 08 04:58 PM
adding range of numbers to if statement with three criteria Mifty Excel Worksheet Functions 4 November 7th 07 11:18 AM
Adding all numbers in a given range Deecrypt Excel Programming 3 January 23rd 07 06:48 PM
Adding a range of numbers associated with various dates missin44 Excel Discussion (Misc queries) 3 January 18th 07 03:31 PM


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