Find last occurrence of each unique value in column if criteria met

dazed007

New Member
Joined
Apr 28, 2015
Messages
10
Hello, firstly this is a follow up question to the below thread:

http://www.mrexcel.com/forum/excel-...nce-each-unique-value-column.html#post4143098

I was kindly give the following array formula to display Yes in column B for the last occurrence of each unique value in column A:

=REPT("Yes",ROWS($1:1)=MATCH(1,0/(A$1:A$9=A1)))

I would now like to achieve the same with but don't want to include rows where column C equals NA.

For example:

ABC
BN1
BN2
BN1
BN4Yes
BN3Yes
BN3NA
BN2Yes
BN1
BN1Yes

<tbody>
</tbody>

Hope this is explained clearly enough and appreciate any help you can offer.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hi again.

Again, array formula**:

=REPT("Yes",ROWS($1:1)=MATCH(1,0/((A$1:A$9=A1)*(C$1:C$9<>"NA"))))


**Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
 
Upvote 0
Hi! Really glad you were around again to help, I've tested and of course your solution works as requested!

Thank you (again).
 
Upvote 0

Forum statistics

Threads
1,215,353
Messages
6,124,462
Members
449,163
Latest member
kshealy

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