SUM(IF formula that disregards a + or - in the cell

Sirod

New Member
Joined
Aug 6, 2009
Messages
47
Hello,

I am looking for a formula that will count matches disregarding a + or – sign in the cell. Below is a sample of my data. There are 10 criteria that I want to count matches on. The first line is the standard against which all other rows of data will be compared. Some of the criteria ratings have a + or – with the rating. The + or – should be ignored when counting matches (i.e. 3=3+=3- = match). The current formula in L3 is =SUM(IF($B$2:$K$2=B3:K3,1,0)). This gives a result of 2 matches for ID #13. The number of matches should actually be 5 (I have highlighted the matches in yellow to illustrate).

How can I amend my formula to disregard the + and -?

1608149355117.png


Thanks.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
If your criteria will always be one character as shown, try
Excel Formula:
=SUM(IF($B$2:$K$2&""=LEFT(B3:K3),1,0))
 
Upvote 0
If your criteria will always be one character as shown, try
Excel Formula:
=SUM(IF($B$2:$K$2&""=LEFT(B3:K3),1,0))
Thank you, that worked.

I have a follow-up questions - we haven't done this yet, but if one day we did decide to combine how we display criteria 8 & 9, i.e. 3/B or 3/A using the above examples, how would I amend the formula? The matches would still be based upon the two criteria separately, but the rating could be combined into one cell.

Thanks.
 
Upvote 0
Don't combine them. Each cell should contain just one piece of information.
 
Upvote 0
Don't combine them. Each cell should contain just one piece of information.

Don't combine them. Each cell should contain just one piece of information.
I agree. However, it may be out of my hands. These two criteria are often discussed in tandem and referred to together, so I can foresee needing to be able to count matches this way one day. Should it come up, do you have a solution? Many thanks.
 
Upvote 0
Not of the top of my head, it would almost certainly need to be a complicated array formula of some type.
 
Upvote 0
I have a follow-up questions - we haven't done this yet, but if one day we did decide to combine how we display criteria 8 & 9, i.e. 3/B or 3/A using the above examples, how would I amend the formula? The matches would still be based upon the two criteria separately, but the rating could be combined into one cell.
What version of Excel are you using?

If Excel 365..
  • Do you have the SEQUENCE function?
  • Do you have the LET function?

Can you confirm that all criteria to be compared are single characters, even if 2 or more are combined in a single cell like 3/B?
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,927
Members
449,094
Latest member
teemeren

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