Help me fix a SUM formula please

Jyggalag

Active Member
Joined
Mar 8, 2021
Messages
445
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi all,

I have this formula:

=IFERROR(SUM(IF(FREQUENCY(IF($A$2:$A$101=A2;IF($D$2:$D$101=D2;IF($H$2:$H$101=H2;MATCH($I$2:$I$101;$I$2:$I$101;0))));ROW($A$2:$A$101)-ROW($A$2)+1);1));"0")

It checks the following sheet (please note that A2, A3 and A4 have the same value):
'
1683200754797.png


I want the formula to look at the value in A2. After this, it has to look up if A2 appears anywhere else in column A, and if the value of A2 does indeed appear anywhere else, it has to check if the respective values for this row in column D, H and I match the values in D2, H2 and I2. If they do, it should return the value "1", because they are the same item. However, if a single value in either D, H or I deviate, it should add it, so B2 returns "2", and "3" if it finds two more, and "4" if it finds 3 more unique values and so on.

I hope this makes sense? I have tried to do it above, but my formula is not working. It correctly returns "0" for row 5 and 6, as these have no values in columns D, H, and I.
It also correctly returns "2" for row 3 and 4, as the values in row 2 and 3 are similar.
However, it incorrectly returns "1" in cell B2, because clearly I4 is different from I3 and I2 and these rows have the same value in column A, so they are the same item, but with a different value in column I, which should then return the value "2".

I know this is very complex, but I would GREATLY appreciate if someone could fix my formula! :)
 
this formula is absolutely insane AND IT WORKS!!!

you are my savior awoohaw! that's a crazyyy formula I love it haha

thank you so much! you have no idea how much this helps me, really appreciate it <3 :)


My pleasure. I am happy you were able to find a solution in the forum.

Best Wishes!
 
Upvote 1

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

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