SUMIF(and) Formula Problem

madhunt

New Member
Joined
Jun 16, 2011
Messages
2
Hi All,

I am trying to write a SUMIF(and) formula, but it just doesn't seem to work... Am I missing something in the formula below? No matter how much I stare at it, I just can't understand why it isn't working...

{=SUM(($AG:$AG="*"&C3&"*")*($U:$U=D2)*$A:$A)}

I've set it up as an array formula...

Many thanks in advance
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Hi All,

I am trying to write a SUMIF(and) formula, but it just doesn't seem to work... Am I missing something in the formula below? No matter how much I stare at it, I just can't understand why it isn't working...

{=SUM(($AG:$AG="*"&C3&"*")*($U:$U=D2)*$A:$A)}

I've set it up as an array formula...

Many thanks in advance

If you are on 2007 or later...

=SUMIFS($A:$A,$U:$U,D2,$AG:$AG,"*"&C3&"*")

On all systems...

=SUM(IF($U$2:$U$2000=D2,IF(ISNUMBER(SEARCH(C3,$AG$2:$AG$2000)),$A$2:$A$2000)))

which needs to be confirmed with control+shift+enter, not just enter.
 
Upvote 0
Thank you very much.... Your formula worked a treat...

It's worth me pointing out that I slightly altered it to:

=SUM(IF($U$2:$U$2000=D2,IF(ISNUMBER(SEARCH("*"&C3&"*",$AG$2:$AG$2000)),$AI$2:$AI$2000)))

The part i changed was:
("*"&C3&"*",$AG$2:$AG$2000) because I am searching within the cells for a partial word...

But, as said, your magic worked a treat!
 
Upvote 0
Thank you very much.... Your formula worked a treat...

It's worth me pointing out that I slightly altered it to:

=SUM(IF($U$2:$U$2000=D2,IF(ISNUMBER(SEARCH("*"&C3&"*",$AG$2:$AG$2000)),$AI$2:$AI$2000)))

The part i changed was:
("*"&C3&"*",$AG$2:$AG$2000) because I am searching within the cells for a partial word...

But, as said, your magic worked a treat!

Great. Thanks for providing feedback. By the way, SEARCH(C3,X) and SEARCH("*"&C3&"*",X) should behave the same way.
 
Upvote 0

Forum statistics

Threads
1,224,525
Messages
6,179,317
Members
452,905
Latest member
deadwings

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