using sumif with possibly text before

econ

New Member
Joined
Feb 6, 2025
Messages
2
Office Version
  1. Prefer Not To Say
Platform
  1. Windows
I need to do a sumif, but stripping the (10997) from the reference cell and also the reference range. Can this be done. in other words, I need to sumif "ABC Corp" is found in a range of cells.
I was trying to incorporate textbefore, but its not working for the reference range part. If any of that makes sense.
Thanks

ABC Corp (10997)
=IF(SUMIF('GP AP Aging - Detail'!A:A,A19,'GP AP Aging - Detail'!F:F)>0,SUM(C19:I19)-W19,0)
 
Hi and welcome to MrEXcel

Try:

Rich (BB code):
=IF(SUMIF('GP AP Aging - Detail'!A:A,TEXTBEFORE(A19, " (") & "*",'GP AP Aging - Detail'!F:F)>0,SUM(C19:I19)-W19,0)
 
Upvote 0
I need to do a sumif, but stripping the (10997) from the reference cell and also the reference range. Can this be done. in other words, I need to sumif "ABC Corp" is found in a range of cells.
I was trying to incorporate textbefore, but its not working for the reference range part. If any of that makes sense.
Thanks

ABC Corp (10997)
=IF(SUMIF('GP AP Aging - Detail'!A:A,A19,'GP AP Aging - Detail'!F:F)>0,SUM(C19:I19)-W19,0)

Hi and welcome to MrEXcel

Try:

Rich (BB code):
=IF(SUMIF('GP AP Aging - Detail'!A:A,TEXTBEFORE(A19, " (") & "*",'GP AP Aging - Detail'!F:F)>0,SUM(C19:I19)-W19,0)
Ok, perfect, I think that worked.... I was not using the wildcard properly. Thank you!
 
Upvote 0
@econ
Office Version: 'Prefer Not To Say' is not very helpful to people here trying to help you since different versions have different functions and features available to them. I also can't see that your Excel version(s) is something that would need to be kept private so perhaps you could consider changing that if you intend to ask further questions in the forum. It will generally get you suitable responses more quickly.
 
Upvote 0

Forum statistics

Threads
1,226,771
Messages
6,192,926
Members
453,767
Latest member
922aloose

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