Totaling across a range based on text string

HavocManiac

New Member
Joined
Feb 18, 2015
Messages
1
Not an excel guru at all but what I'm looking to do is search a column for a text string and if it finds it run a total sum based on the value to the left. I'm looking to do this across two sheets and look for the same text string and same column. Any help? Thanks up front!!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
you could use something like this to allow you to add two searches together


on sheet 1

[TABLE="width: 315"]
<tbody>[TR]
[TD][TABLE="width: 315"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]20[/TD]
[TD]cat[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]20[/TD]
[TD]dog[/TD]
[TD="align: right"]160[/TD]
[TD]< formula<formula<formula< td=""></formula<formula<>
[/TD]
[/TR]
[TR]
[TD="align: right"]20[/TD]
[TD]cat[/TD]
[TD]cat[/TD]
[TD]<< search term[/TD]
[/TR]
[TR]
[TD="align: right"]20[/TD]
[TD]cat[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]20[/TD]
[TD]dog[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]20[/TD]
[TD]cat[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]20[/TD]
[TD]dog[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
on sheet 2

[TABLE="width: 128"]
<tbody>[TR]
[TD="class: xl65, width: 64"][/TD]
[TD="class: xl65, width: 64"][/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]20[/TD]
[TD="class: xl65"]cat[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]20[/TD]
[TD="class: xl65"]dog[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]20[/TD]
[TD="class: xl65"]cat[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]20[/TD]
[TD="class: xl65"]cat[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]20[/TD]
[TD="class: xl65"]dog[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]20[/TD]
[TD="class: xl65"]cat[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]20[/TD]
[TD="class: xl65"]dog[/TD]
[/TR]
</tbody>[/TABLE]



Code:
=(SUMIF(B2:B9,C4,A3:A9)) + (SUMIF(Sheet2!B2:B9,C4,Sheet2!A2:A9))
 
Upvote 0

Forum statistics

Threads
1,226,693
Messages
6,192,463
Members
453,725
Latest member
cvsdatreas

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
Back
Top