Count Dates on a ROW if the criteria in a corresponding COLUMN matches a specific value in another cell

MattDaddyRamos

New Member
Joined
Sep 11, 2013
Messages
45
Hi All,
I have two sheets that I am working with:
  • Sheet 1:
    • Has the cell I want to return the result in
    • Has a Specific Identifier I need to be matched


  • Sheet 2:
    • Has a Column of multiple identifiers that is used to match the specific identifier on Sheet 1
    • Has a ROW of 6 unique dates for each matching identifier

Sheet 1:
I need each cell in column I to return the number of times any date is populated in columns D-I when the loan numbers match
I need each cell in column J to return the last (highest/closest) date from the dates in columns D-I when the loan numbers match
BOTH need to ignore blanks and if there are NO dates at all return a blank cell
ABCDEFGHIJ
1Loan ## of DatesLast Date
21234603/05/14
34567403/01/14
47890603/01/14
54321
67654
71098
89632
97412

<TBODY>
</TBODY>

















Sheet 2:
ABCDEFGHI
1Loan #Date 1Date 2Date 3Date 4Date 5Date 6
2741201/05/1401/20/1402/10/14
3109801/03/14
4789001/10/1401/15/1402/05/1402/10/1402/20/1403/01/14
57654
6432102/10/1403/01/14
7123401/01/1401/29/1402/10/1402/20/1402/25/1403/05/14
89632
9456701/10/1402/10/1402/25/1403/01/14

<TBODY>
</TBODY>

**For Count I've tried: =COUNTIF(INDEX('Sheet 2'!D:I,MATCH('Sheet 1'!A8,'Sheet 2'!C:C,0),0),">"&'Sheet 1'!$A$1) - where A1 is =NOW()
But when I copy the formula down to the other rows it still only counts the dates in the top row.

**For Last Date I've tried:=MAX(IF(NOT(ISERROR('Sheet 2'!D:I)),IF('Sheet 2'!C:C,'Sheet 1'!A8),'Sheet 2'!D:I))
But when I copy the formula down to the other rows it still only reads the dates in the top row.



I hope that wasn't super confusing. Any help you can offer would be greatly appreciated.

Thanks,

MattDaddyRamos
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Try...

I2:

=COUNT(INDEX(Sheet2!$C$2:$I$9,MATCH($A2,Sheet2!$C$2:$C$9,0)))

J2:

=LOOKUP(9.99999999999999E+307,INDEX(Sheet2!$C$2:$I$9,MATCH($A2,Sheet2!$C$2:$C$9,0)))
 
Upvote 0
Try...

I2:

=COUNT(INDEX(Sheet2!$C$2:$I$9,MATCH($A2,Sheet2!$C$2:$C$9,0)))

J2:

=LOOKUP(9.99999999999999E+307,INDEX(Sheet2!$C$2:$I$9,MATCH($A2,Sheet2!$C$2:$C$9,0)))

Thanks Aladin,

But neither seem to work properly. The one you gave me for I2 returns a blank result (should be 4) and the one for J2 returns a #REF! (should be 03/02/14).

Keep in mind that the loan lists are not going to be in the same order on both sheets and one sheet may have more loans on it than the other, if that makes a difference.
 
Last edited:
Upvote 0
Thanks Aladin,

But neither seem to work properly. The one you gave me for I2 returns a blank result (should be 4) and the one for J2 returns a #REF! (should be 03/02/14).

Keep in mind that the loan lists are not going to be in the same order on both sheets and one sheet may have more loans on it than the other, if that makes a difference.

My bad. I left them incomplete...

I2:

=COUNT(INDEX(Sheet2!$C$2:$I$9,MATCH($A2,Sheet2!C2:C9,0),0))

J2:

=LOOKUP(9.99999999999999E+307,INDEX(Sheet2!$C$2:$I$9,MATCH($A2,Sheet2!$C$2:$C$9,0),0))
 
Upvote 0

Forum statistics

Threads
1,215,594
Messages
6,125,723
Members
449,255
Latest member
whatdoido

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