Numbers occurrence in list.

Sunshine2020

New Member
Joined
Nov 28, 2020
Messages
13
Office Version
  1. 2016
Platform
  1. Windows
  2. Mobile
I have a list of numbers including 0 to 30. How to get the position (row number) for all 0 to 30 already appeared twice or three times in the list? I am working on to get one array formula to get the row number result into one cell. Also this worksheet should be worked in iPhone version Excel.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Here is a sample of array formula you can use
 

Attachments

  • Formula Count.jpg
    Formula Count.jpg
    54.9 KB · Views: 17
Upvote 0
An interesting problem.

Assuming you have your 0 to 30 numbers in range A1:A1000, see if the following array formula works for you.
It returns the row number by which all 0 to 30 numbers have appeared at least twice.
Excel Formula:
=MAX(MATCH(COLUMN(INDIRECT("C1:C31",))-1,IF(MMULT(--(ROW($A$1:$A$1000)=MATCH(COLUMN(INDIRECT("C1:C31",))-1,$A$1:$A$1000,0)),SIGN(ROW(INDIRECT("R1:R31",)))),"",$A$1:$A$1000),0))
If you have the SEQUENCE function in your excel, here is a more compact version of the formula:
Excel Formula:
=MAX(MATCH(SEQUENCE(,31,0),IF(MMULT(--(ROW($A$1:$A$1000)=MATCH(SEQUENCE(,31,0),$A$1:$A$1000,0)),SEQUENCE(31,,1,0)),"",$A$1:$A$1000),0))
 
Upvote 0
Looks like I did not understand the question properly :)
 
Upvote 0
An interesting problem.

Assuming you have your 0 to 30 numbers in range A1:A1000, see if the following array formula works for you.
It returns the row number by which all 0 to 30 numbers have appeared at least twice.
Excel Formula:
=MAX(MATCH(COLUMN(INDIRECT("C1:C31",))-1,IF(MMULT(--(ROW($A$1:$A$1000)=MATCH(COLUMN(INDIRECT("C1:C31",))-1,$A$1:$A$1000,0)),SIGN(ROW(INDIRECT("R1:R31",)))),"",$A$1:$A$1000),0))
If you have the SEQUENCE function in your excel, here is a more compact version of the formula:
Excel Formula:
=MAX(MATCH(SEQUENCE(,31,0),IF(MMULT(--(ROW($A$1:$A$1000)=MATCH(SEQUENCE(,31,0),$A$1:$A$1000,0)),SEQUENCE(31,,1,0)),"",$A$1:$A$1000),0))
Thanks for your answers. It is a very brilliant idea for get the row number for appearing twice. Is it possible to extend it to find the row number by which all numbers have already appear three time or four time...?
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,606
Members
449,089
Latest member
Motoracer88

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