ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count (https://www.excelbanter.com/excel-worksheet-functions/146654-count.html)

brownti via OfficeKB.com

Count
 
i have data that looks like the following:

2 7
1 5
2 7
1 4
2 7

I need a formula that will find how many time the number 7 is in the right
column and add up the corresponding number in the left column. So the answer
for this example would be 6, found 3 sevens in right column so added 2+2+2.
I tried an index(...,match( but couldnt get it to work. Please help.
Thanks.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200706/1


Rick Rothstein \(MVP - VB\)

Count
 
i have data that looks like the following:

2 7
1 5
2 7
1 4
2 7

I need a formula that will find how many time the number 7 is in the right
column and add up the corresponding number in the left column. So the
answer
for this example would be 6, found 3 sevens in right column so added
2+2+2.
I tried an index(...,match( but couldnt get it to work. Please help.
Thanks.


Try this...

=SUMIF(B1:B5,"=7",A1:A5)

where I have assumed the first column of numbers is in A1:A5 and the second
column of numbers is in B1:B5.

Rick


Teethless mama

Count
 
=SUMIF(B1:B5,7,A1:A5)


"brownti via OfficeKB.com" wrote:

i have data that looks like the following:

2 7
1 5
2 7
1 4
2 7

I need a formula that will find how many time the number 7 is in the right
column and add up the corresponding number in the left column. So the answer
for this example would be 6, found 3 sevens in right column so added 2+2+2.
I tried an index(...,match( but couldnt get it to work. Please help.
Thanks.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200706/1




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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com