Finding 2nd Occurrence

erniepoe

Active Member
Joined
Oct 23, 2006
Messages
377
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I have the following formula (#1) to find the 2nd occurrence in Column B when the date value in column D is greater than the date in cell F2, but i wanted to add a 2nd argument to it, If the value in column H equals the value of the cell in F3, but can't make it work (#2).

have tried different combinations with also adding the Row(H44:106) - ROW(INDEX(H44:H106) clause, but nothing seems to work for me.

Any ideas what I am doing wrong? Thanks so much for any help.

Best,
Ernie


1) =INDEX(B44:B106,SMALL(IF(D44:D106>F2,ROW(D44:D106)-ROW(INDEX(D44:D106,1,1))+1),2))


2) =INDEX(B44:B106,SMALL(IF(AND(D44:D106>F2,H44:H106=F3),ROW(D44:D106)-ROW(INDEX(D44:D106,1,1))+1),2))
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
How about
Excel Formula:
=INDEX(FILTER(B44:B106,(D44:D106>F2)*(H44:H106=F3)),2)
 
Upvote 0
Wow Fluff, that was way easier than I was making it to be. Thank you! :)
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
Fluff, is there a reason the formula doesn't work when you are referencing from another sheet in the same workbook? And are there alterations I can make to get it functional?

It turned into the following, but I am now getting a #CALC! error. Does it have to be performed on the same sheet?


=INDEX(FILTER('Unsecured Senior Debt'!B44:B106,('Unsecured Senior Debt'!D44:D106>BW14)*('Unsecured Senior Debt'!H44:H106=BW3)),2)
 
Upvote 0
Oh oops, you are correct. BW14 needed to be BW13, so my self-esteem isn't at its highest right now :)

But thank you so much for your help!
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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