Can you SPILL and COUNTIF?

MiniFav

Board Regular
Joined
Mar 10, 2020
Messages
83
Office Version
  1. 365
Platform
  1. Windows
I am looking to count the first instance of data in a column, however when a new row gets inserted the countif needs to be reapplied.
Is there a way to make this spill?

Book1
AB
1DATAFirst instance
2a1
3b1
4c1
5inserted row
6a0
7c0
8d1
9e1
10f1
Sheet1
Cell Formulas
RangeFormula
B2:B4,B6:B10B2=(COUNTIF($A$2:$A2,$A2)=1)+0


I have considered using an IF function prior to force the spill but this results in all returns to be the same.

Any suggestions are most welcome!
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Have you tried converting your range into a table?
 
Upvote 1
Sorry I just realised this had been answered in the past.

Below was the solution.

=LET(a,B3:B1000,IF(MMULT((SEQUENCE(ROWS(a))>=SEQUENCE(,ROWS(a)))*(a=TRANSPOSE(a))*(a<>""),SEQUENCE(ROWS(a),,,0))>1,"Ignore",""))
 
Upvote 0
Solution
Below was the solution.

=LET(a,B3:B1000,IF(MMULT((SEQUENCE(ROWS(a))>=SEQUENCE(,ROWS(a)))*(a=TRANSPOSE(a))*(a<>""),SEQUENCE(ROWS(a),,,0))>1,"Ignore",""))
That seems somewhat different to what you asked for in post #1 but if it does what you want, then wouldn't this much shorter one one also do what you want?
Excel Formula:
=LET(d,B3:B1000,r,ROW(d),IF(IFNA(MATCH(d,B:B,0),r)=r,"","Ignore"))
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
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