Get corresponding values of cell from rows that meet the criteria

Napole0n

New Member
Joined
Sep 20, 2015
Messages
4
Hi guys, I'm currently looking for a formula that will allow me to count the last 'X' number of instances a value appears in 2 rows and then find the corresponding value in another row.

It's best to show this with an example:

Nub5Ucc.png


For this image I need a formula which will count the first 4 instances that the letter 'B' appears in either column A or B and get the corresponding value for column D.

For example If I wanted to count the first four instances that B appeared in either column A or B and get the corresponding number of times X appeared in column D I should get the result of 1. For Y appearing in column D it would be 2.

Thanks very much in advance.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,223,893
Messages
6,175,246
Members
452,623
Latest member
cliftonhandyman

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