SUMIF or SUMPRODUCT with non-number values and partial match

virtuosok

Board Regular
Joined
Sep 2, 2020
Messages
209
Office Version
  1. 365
Platform
  1. Windows
Hi all. Post-processing a third party output which can't be changed, and would like to avoid helper columns.
I have set up the following formula. For blinding purposes only, I am adding (truncated path) insert below; in the actual formula there's a full and correct path:
Excel Formula:
=SUMPRODUCT('https://s(truncated path)status/[Study_Metrics.xlsx]Query Aging'!$AB$3:$AB$20000,--('https://s(truncated path)status/[Study_Metrics.xlsx]Query Aging'!$C$3:$C$20000="*"&"$A3)
It's not working as SUMPRODUCT doesn't support wild cards. I tried SUMIF and can't figure it out either.
In cell A3 I have a 3-digit number, 132
It is formatted as a number, too :)
In cells Query Aging'!$C$3:$C$20000 I have entries of that sort: 0132 - 0132 - Name Surname - Location Name
They have "General" format.
Finally, in Query Aging'!$AB$3:$AB$20000 I have a formula which returns either "" or a number. The output in this column is formatted as "General".
Any ideas please.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Try something like...

=SUMPRODUCT(sum_range,--ISNUMBER(SEARCH("0"&A3,target_range)))
Replace sum_range and target_range accordingly your data

M.
 
Upvote 0
Thanks Marcelo Branco!
I tried this
Excel Formula:
=SUMPRODUCT(sum_range,--ISNUMBER(SEARCH(“0”&A3,target_range)))
...and I'm getting 0. I should be getting 8. I also appended a wildcard after the reference to A3
Excel Formula:
=SUMPRODUCT(sum_range,--ISNUMBER(SEARCH(“0”&A3&"*",target_range)))
...still getting 0
How can I have the formula ignore the red piece in the reference range? E.g. 0132 - 0132 - Name Surname - Location Name
The “0”&A3 component within the formula should take care of the leading - green - zero, but the wild card is still not helping with the red piece that follows. I do have 132 in cell A3, formatted as number...
 
Upvote 0
I don't know how you are getting the data (???)

The formula worked for me with the data in the same workbook (example below)
Pasta1
ABCD
2CriteriaResultTextFormulas
31323000132 - 0132 - Name Surname - Location Name100
4xxx20
50132 - 0132 - Name Surname - Location Name200
60132 - 0132 - Name Surname - Location Name 
7zzz40
8
Plan9
Cell Formulas
RangeFormula
B3B3=SUMPRODUCT(D3:D7,--ISNUMBER(SEARCH("0"&A3,C3:C7)))
D4,D6:D7D4=IF(ISNUMBER(F4),F4,"")


M.
 
Upvote 0
Solution
I don't know how, but this variant (without leading "0"&) works for me:
=SUMPRODUCT(sum_range,--ISNUMBER(SEARCH(A3,target_range)))
...and as such, the issue is solved :)
 
Upvote 0

Forum statistics

Threads
1,215,025
Messages
6,122,732
Members
449,093
Latest member
Mnur

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