Skip Blanks Based on Multiple Criteria's

CuriousForge

New Member
Joined
Aug 20, 2018
Messages
24
Hello!

I am at wits end with this one having spent an entire day on it

My desired results are in Col D in blue.

I have unique Case ID's but duplicate codes. I want the Approved codes to show the approved Case ID by skipping blanks & picking the first match it gets.

1695900251341.png
 

Attachments

  • Screenshot.jpg
    Screenshot.jpg
    60.3 KB · Views: 11

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
365 Enterprise

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Try this...
Book1
ABCD
1Case ID (unqiue)Code (Duplicates)ApprovedApproved Case ID
2AlliA828A138
3A123A553A132
4A124A642 
5A132553ApprovedA132
6A138828ApprovedA138
7A145727A158
8A151633 
9A158727ApprovedA158
10A164828A138
Sheet2
Cell Formulas
RangeFormula
D2:D10D2=FILTER($A$2:$A$10,($B$2:$B$10=B2)*($C$2:$C$10="Approved"),"")

It would likely result in an error if a code is "Approved" more than once.

Hope that helps,

Doug
 
Upvote 1
Solution
Here is an alternate formula that I don't think will give an error for the scenario I mentioned.
Book1
ABCDE
1Case ID (unqiue)Code (Duplicates)ApprovedApproved Case ID
2AlliA828A138A138
3A123A553A132A132
4A124A642  
5A132553ApprovedA132A132
6A138828ApprovedA138A138
7A145727A158A158
8A151633  
9A158727ApprovedA158A158
10A164828A138A138
Sheet2
Cell Formulas
RangeFormula
D2:D10D2=FILTER($A$2:$A$10,($B$2:$B$10=B2)*($C$2:$C$10="Approved"),"")
E2:E10E2=IFERROR(INDEX($A$2:$A$10,MATCH(B2&"Approved",$B$2:$B$10&$C$2:$C$10,0)),"")
 
Upvote 1
Thanks a ton Doug - it works!!
I really wish I had posted this earlier, would've saved me so much time & effort. You're a saviour! Cheers!
 
Upvote 0
I learned by struggling...I have spent days on lesser problems.😆

You're welcome. Glad to help.

Doug
 
Upvote 1
I learned by struggling...I have spent days on lesser problems.😆

You're welcome. Glad to help.

Doug
Very relatable... been there myself, as recent as today.
Having worked on Excel so many years one would think they have a hang of things, but it always finds a way to humble you. 😄
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,279
Members
452,630
Latest member
OdubiYouth

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