Trying to use Sumif

Cdshep15

New Member
Joined
Feb 24, 2006
Messages
35
I am trying to use SUMIF to sum a number of items on one tab into one cell on the other.

I have a cell with a three series of numbers in one cell. In that same row, next cell, I would like to return values from another sheet which are in different rows.:

Sheet 1:

Column A column C
----------- ------------
Row 1 887989
987677 ????Formula????
876663 (all in one cell )


Sheet 2:
Column A Column B
----------- -----------
row 1 887989 1
row 2 987677 4
row 3 876663 3


Ideally, I would like that formula to return 8 as the answer.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

just_jon

Legend
Joined
Sep 3, 2002
Messages
10,473
I'm not sure, at all, what you really want here -- what are the 'givens', and what should be returned?
 

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,884
Hi Cdshep15

I'm not sure I understand you question. This is my wild guessing:

You say that all the 3 numbers are in the same cell? What is the delimeter.

So in Sheet1!A1 you have something like

"887989 987677 876663"

And in Sheet1!B1 you would like a formula equivalent to

=VLOOKUP(887989,Sheet2!A:B,2,0)+VLOOKUP(987677,Sheet2!A:B,2,0)+VLOOKUP(876663,Sheet2!A:B,2,0)=1+4+3=8

Am I close?

Please elaborate.

Regards
PGC
 

vane0326

Well-known Member
Joined
Aug 29, 2004
Messages
819
Here is one and many ways to do this.


Formula in cell B3:


=SUMPRODUCT(--(D3:D10=LEFT(A2,6)+0)+(D3:D10=MID(A2,7,7)+0)+(D3:D10=RIGHT(A2,6)+0),E3:E10)


Maybe someone could come up a better formula.
Book1
ABCDEF
1
2887989 987677 876663
34
4
58879891
69876772
78766631
8
9
10
11
Sheet1
 

Forum statistics

Threads
1,137,300
Messages
5,680,699
Members
419,928
Latest member
dolincasting

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top