compare several sums

excelNewbie22

Well-known Member
Joined
Aug 4, 2021
Messages
510
Office Version
  1. 365
Platform
  1. Windows
hi!
all the ranges are equal, why doesn't it return 1?
test
CDEFGHIJKLMNOPQ
2147911121-2-3-4-5-291234529
3125101115
4
50
test
Cell Formulas
RangeFormula
L2:Q2L2=TRIM(MID(SUBSTITUTE(J2,"-",REPT(" ",99)),SEQUENCE(,6,,99),99))
L5L5=IF(AND(SUM($C$2:$H$2=$C$3:$H$3),(SUM($C$3:$H$3=L2:Q2))),1,0)
Dynamic array formulas.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
You cannot sum boolean values (ie True & False) so both sums come to 0 which is false.
 
Upvote 0
"boolean values" because i used IF ?

can you please help me with a better solution?
 
Upvote 0
What exactly are your trying to do. Providing a formula that does not work & no explanation is not very helpful.
 
Upvote 0
i want to check if the sum of c2:h2 is equal to c3:h3 and also equal to l2:q2
 
Upvote 0
That will never be true as the "numbers" in L2:Q2 are text
 
Upvote 0
so, is there a better formula to split j2 into numbers only in separated cells (without the hyphens) so i could compare the sums?
 
Upvote 0
How about
Excel Formula:
=IF(AND(SUM($C$2:$H$2)=SUM($C$3:$H$3),SUM($C$3:$H$3)=SUM(--L2:Q2)),1,0)
 
Upvote 0
Solution
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,440
Messages
6,124,882
Members
449,193
Latest member
PurplePlop

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