Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Sum values referring to a cell with same value

Hey. I want to know what's the easiest way of doing that... I'll try to
explain, it's simple

Let's say I have a table with many fruits in one cell, and the amount of
them on the cell next to them. I want to sum all the "pears" that are on my
table. How do I do it?

e.g.

A B
1 apple 5
2 pear 10
3 banana 8
4 pear 6
5 apple 6
6 pear 1

I want a cell that will give me 17 when the string looked for is pear
(B2+B4+B6), or 11 when it looks for apple (B1+B5)... hope it was easy to
understand
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 281
Default Sum values referring to a cell with same value

Hi,

Try this:
A B
1 apple 5
2 pear 10
3 banana 8
4 pear 6
5 apple 6
6 pear 1


12 Apple =SUMIF($A$1:$A$6,A12,$B$1:$B$12)
13 Pear
14 Banana

and copy formula in cell B12 to B14 (in this example)

Thanks,

--
Farhad Hodjat


"ghnogueira" wrote:

Hey. I want to know what's the easiest way of doing that... I'll try to
explain, it's simple

Let's say I have a table with many fruits in one cell, and the amount of
them on the cell next to them. I want to sum all the "pears" that are on my
table. How do I do it?

e.g.

A B
1 apple 5
2 pear 10
3 banana 8
4 pear 6
5 apple 6
6 pear 1

I want a cell that will give me 17 when the string looked for is pear
(B2+B4+B6), or 11 when it looks for apple (B1+B5)... hope it was easy to
understand

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 281
Default Sum values referring to a cell with same value

sorry my type mistake the formula is:
=SUMIF($A$1:$A$6,A12,$B$1:$B$6)

Thanks,
--
Farhad Hodjat


"Farhad" wrote:

Hi,

Try this:
A B
1 apple 5
2 pear 10
3 banana 8
4 pear 6
5 apple 6
6 pear 1


12 Apple =SUMIF($A$1:$A$6,A12,$B$1:$B$12)
13 Pear
14 Banana

and copy formula in cell B12 to B14 (in this example)

Thanks,

--
Farhad Hodjat


"ghnogueira" wrote:

Hey. I want to know what's the easiest way of doing that... I'll try to
explain, it's simple

Let's say I have a table with many fruits in one cell, and the amount of
them on the cell next to them. I want to sum all the "pears" that are on my
table. How do I do it?

e.g.

A B
1 apple 5
2 pear 10
3 banana 8
4 pear 6
5 apple 6
6 pear 1

I want a cell that will give me 17 when the string looked for is pear
(B2+B4+B6), or 11 when it looks for apple (B1+B5)... hope it was easy to
understand

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Sum values referring to a cell with same value

No problem mate! Thanks =)

I forgot about the SUMIF function... thanks =)



"Farhad" wrote:

sorry my type mistake the formula is:
=SUMIF($A$1:$A$6,A12,$B$1:$B$6)

Thanks,
--
Farhad Hodjat


"Farhad" wrote:

Hi,

Try this:
A B
1 apple 5
2 pear 10
3 banana 8
4 pear 6
5 apple 6
6 pear 1


12 Apple =SUMIF($A$1:$A$6,A12,$B$1:$B$12)
13 Pear
14 Banana

and copy formula in cell B12 to B14 (in this example)

Thanks,

--
Farhad Hodjat


"ghnogueira" wrote:

Hey. I want to know what's the easiest way of doing that... I'll try to
explain, it's simple

Let's say I have a table with many fruits in one cell, and the amount of
them on the cell next to them. I want to sum all the "pears" that are on my
table. How do I do it?

e.g.

A B
1 apple 5
2 pear 10
3 banana 8
4 pear 6
5 apple 6
6 pear 1

I want a cell that will give me 17 when the string looked for is pear
(B2+B4+B6), or 11 when it looks for apple (B1+B5)... hope it was easy to
understand

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
referring to a cell containing a file name [email protected] Excel Discussion (Misc queries) 2 December 4th 06 05:03 PM
formula works when referring to one cell but not to another Nicci New Users to Excel 3 July 7th 06 02:03 PM
How to return a value Referring to the other cell. ramana Excel Worksheet Functions 6 November 7th 05 09:11 AM
SUMIF function referring to values on different Worksheet TeeBee0831 Excel Worksheet Functions 10 May 3rd 05 10:28 PM
cell text referring to tab name Trilexist Excel Worksheet Functions 1 February 15th 05 04:16 PM


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