Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

how determine rows

Forum home » Delegate support and help forum » Microsoft Excel Training and help » How to determine the rows where 2 equal numbers are in a column

How to determine the rows where 2 equal numbers are in a column

ResolvedVersion 2013

Rita has attended:
O365 Digital Champions course
O365 Intermediate training PM course
PowerPoint Intermediate Advanced course

How to determine the rows where 2 equal numbers are in a column

I have the following problem:

I have the following column in a table:

2
1
1
1
2
1
1
1
2
1
1

I need to find out the rows where the first and last "2" are. I can not change the table to sort it in ascending order.

I have used vlookup() to determine the first "2" but I don't know how to make excel look up this value starting on the last row and working its way to the first row. Can this be done? Or is there any other way I can find the row number where the last "2" is?

Thanks.

RE: How to determine the rows where 2 equal numbers are in a col

Hi Rita,

Thank you for the forum question.

You can do it using a combination of the Sumproduct, Max and Row function.

In the example below I have the numbers in the range A1:A13.

=SUMPRODUCT(MAX(ROW(1:13)*(A1:A13=2)))

If you want to find the row number for the first 2 you have in the range:

=MATCH(2,A1:A13,0)



Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

Mon 27 Mar 2017: Automatically marked as resolved.

Excel tip:

Adding cells, Rows & columns

place your cursor on a cell, row number or column letter and use CTRL + SHIFT + + or CTRL + + depending on which + you prefer to use.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.11 secs.