1 Plus Sumproduct Find 1st Instance.

billandrew

Well-known Member
Joined
Mar 9, 2014
Messages
743
The below formula part of another thread find 1st Instance. Can someone explain 1 Plus.

D2 =1+SUMPRODUCT(($A$2:$A$10=$A2)*($B$2:$B$10<$B2))
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Effectively, the formula is saying: for all results in A2:B10 where I have a match in Column A with my (i.e. row 2) Column A value, what is the rank (in ascending order) of my column B value?

If the Sumproduct returns 3, this means that there are 3 Column A matches, with values in column B lower than my value, therefore my rank is 1+3 = 4.

If you could be sure there weren't any duplicate values in column B, you could use:
=SUMPRODUCT(($A$2:$A$10=$A2)*($B$2:$B$10<=$B2))
or
=COUNTIFS($A$2:$A$10,$A2,$B$2:$B$10,"<="&$B2)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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