Stuck - help with function (amateur level)

Camel123

Board Regular
Joined
Jun 5, 2018
Messages
186
Hi,

Column A: article numbers + products name, for instance "77 Fishing Rod"
Column B: sales per product

Function 1: If text strings in column A contain 77, 88 or 99. Then sum the sales for those article numbers/products only.

Function 2: Sum all sales for products that do not have article number 77, 88 and 99 in column A.

Appreciate all feedback, thanks.
 
Not sure where you are getting the one's you are trying.

You need to try either the one I posted last, or FormR's.
 
Upvote 0

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
First formula seem to work suggested by FormR! Thanks a lot. I just want to understand its logic because the "*" is what makes it return the specific value for the criterias met. Is it not a wild card and is there any risks that it will sum approximate matches?
 
Last edited:
Upvote 0
Yes its a wild card, it will match any cells that begin with the numbers you specified, followed by ANY other text.
 
Upvote 0
Yes its a wild card, it will match any cells that begin with the numbers you specified, followed by ANY other text.

Is there any work around to make it compute only exact matches and somehow replace the wildcard in the suggested formula by FormR? I tried to remove the wildcard and add isnumber/find but then it just turns to zero.
 
Last edited:
Upvote 0
Not sure what you mean?

My formula & FormR's, finds {77,88,99} if it matches it will sum the corresponding values in Col B.
 
Upvote 0
I tried to remove the wildcard and add isnumber/find but then it just turns to zero.

I'm not sure what you mean either - the sumifs() option specifically checks that the values in column A start with 77, 88 or 99 - can you post some examples of possible column A entries that you think will result in a false positive?
 
Upvote 0
I tried yours but does not seem to work or I am doing something wrong, evaluation: =sumproduct((isnumber(({1;#VALUE!;#N/A}))*B1:B15)). Can you post a picture form your workbook like FormR did? FormR's formula works but I have some article numbers with the same beginning, for instance: 99XX, 99YYYY, 99Z and I can not risk the formula to sum all of those together due to the wildcard. Hope it made my point more clear :)
 
Upvote 0
I have some article numbers with the same beginning, for instance: 99XX, 99YYYY, 99Z and I can not risk the formula to sum all of those together due to the wildcard.

Using a combination of ISNUMBER(FIND()) will not help resolve that, you could try changing the SUMIFS() to check that the column A values start with the two digit number followed by a space like this:

=SUM(SUMIFS(B:B,A:A,{"77","88","99"}&" *"))
 
Last edited:
Upvote 0
I have no space's in the article numbers so it seems to work perfect so there is no risk capturing the wrong products. You guys are best, appreciate your support a lot - thank you :beerchug:!!
 
Upvote 0

Forum statistics

Threads
1,223,907
Messages
6,175,300
Members
452,633
Latest member
DougMo

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