Trying to return only rows containing a Case sensitive value.

jordiejones

New Member
Joined
May 5, 2010
Messages
31
I have tried previous helper columns that would allow me to return rows but looking for a nice clean solution. here's what my data looks like.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Ted[/TD]
[TD]DP[/TD]
[TD]dp[/TD]
[TD]dp[/TD]
[TD]bp[/TD]
[/TR]
[TR]
[TD]Angela[/TD]
[TD]dp[/TD]
[TD]dp[/TD]
[TD]ap[/TD]
[TD]dp[/TD]
[/TR]
[TR]
[TD]Mike[/TD]
[TD]dp[/TD]
[TD]DP[/TD]
[TD]dp[/TD]
[TD]DP[/TD]
[/TR]
[TR]
[TD]Scott[/TD]
[TD]PP[/TD]
[TD]lp[/TD]
[TD]dp[/TD]
[TD]dp[/TD]
[/TR]
[TR]
[TD]Renee[/TD]
[TD]dp[/TD]
[TD]dp[/TD]
[TD]ap[/TD]
[TD]DP[/TD]
[/TR]
</tbody>[/TABLE]

I'm trying to create a new list of ONLY rows containing Capitalized "DP" regardless of how many instances
[TABLE="width: 500"]
<tbody>[TR]
[TD]Ted[/TD]
[TD]Dp[/TD]
[TD]dp[/TD]
[TD]dp[/TD]
[TD]bp[/TD]
[/TR]
[TR]
[TD]Mike[/TD]
[TD]dp[/TD]
[TD]DP[/TD]
[TD]dp[/TD]
[TD]DP[/TD]
[/TR]
[TR]
[TD]Renee[/TD]
[TD]dp[/TD]
[TD]dp[/TD]
[TD]ap[/TD]
[TD]DP[/TD]
[/TR]
</tbody>[/TABLE]

I've tried "=EXACT(A2:A5,"DP")" but it only returns EXACT matches in the first cell.
Any help would be greatly appreciated.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi,

Assuming your original table is in A1:E5 (with headers in row 1), array formula** in G1:

=IFERROR(INDEX(A:A,SMALL(IF(MMULT(N(EXACT(B$1:E$5,"DP")),TRANSPOSE(COLUMN(B$1:E$5)^0)),ROW(B$1:E$5)),ROWS(A$1:A1))),"")

Copy down until you start to get blanks for the results.

Then, in H1:

=IF($G1="","",INDEX(B$1:B$5,MATCH($G1,$A$1:$A$5,0)))

Copy to the right as required and also down until you start to get blanks for the results.

Regards

**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
@ XOR LX,

Always a real pleasure to stumble upon your very creative solutions ... :smile:

Cheers
 
Upvote 0
Hi,

Assuming your original table is in A1:E5 (with headers in row 1), array formula** in G1:

=IFERROR(INDEX(A:A,SMALL(IF(MMULT(N(EXACT(B$1:E$5,"DP")),TRANSPOSE(COLUMN(B$1:E$5)^0)),ROW(B$1:E$5)),ROWS(A$1:A1))),"")

Copy down until you start to get blanks for the results.

Then, in H1:

=IF($G1="","",INDEX(B$1:B$5,MATCH($G1,$A$1:$A$5,0)))

Copy to the right as required and also down until you start to get blanks for the results.

Regards

**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).

I wound up using roughly
Code:
{=IFERROR(IF(MATCH(TRUE,EXACT(B1:E1,"DP"),0),1+MAX($F$1:F1),""),"")}

then
Code:
 =IF(ISBLANK(IFERROR(INDEX($A:A,MATCH(ROWS($1:1),$F:$F,0)),"")),"",IFERROR(INDEX($A:A,MATCH(ROWS($1:1),$AH:$AH,0)),""))
copied down and across

Its not the cleanest but it works. I'm going to try your solution to see if it works better! I'll let you know!
 
Upvote 0
Hello,

Besides XOR LX formulas ... you can obviously also use VBA for your extraction ... :wink:
 
Upvote 0

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

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