song
song

Reputation: 83

Find value when counting to a certain number in Excel

I'm trying to match a date column when I count to a certain number. Appreciate all your help in advance.

I have 2 columns, Rep and Ship Date. Each ship date means one product is shipped.

I want to find on what date Rep B delivers 3 products in total. So I have to count the rows with Rep B until I hit 3, and I want to return the date (1/4/2019) in another cell. How do I do it?

-----------------------
|  Col A  |   Col B   |
-----------------------
|   Rep   | Ship Date |
-----------------------
|    A    |  1/1/2019 |
|    A    |  1/2/2019 |
|    A    |  1/2/2019 |
|    B    |  1/2/2019 |
|    B    |  1/2/2019 |
|    B    |  1/4/2019 |
|    B    |  1/5/2019 |
-----------------------

Upvotes: 0

Views: 36

Answers (1)

Scott Craner
Scott Craner

Reputation: 152660

use AGGREGATE

=AGGREGATE(15,6,B2:B8/(A2:A8 = "B"),3)

Upvotes: 2

Related Questions