• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Find nth occurrence in row and return column number

Hesham911

New Member
I am looking to find the nth occurrence in a row and return column number, please.

Assuming data range from A1:S1 (dates), similar dates are in D1 & R1. How can I get column number for the 2nd occurrence which should be 18, please?

Thanks
 
Try this array formula, confirm enter with pressing CTRL+SHIFT+ENTER 3 keystrokes :

=SMALL(IF(A1:S1=D1,COLUMN(A1:S1)),2)

Or this non array formula :

=AGGREGATE(15,6,COLUMN(A1:S1)/(A1:S1=D1),2)

Regards
Bosco
 
Back
Top