Front Office Football Central

Front Office Football Central (https://forums.operationsports.com/fofc//index.php)
-   Off Topic (https://forums.operationsports.com/fofc//forumdisplay.php?f=6)
-   -   Excel / Programming Question (https://forums.operationsports.com/fofc//showthread.php?t=93624)

Vince, Pt. II 02-12-2018 11:37 AM

Excel / Programming Question
 
Is there a way to use a wildcard character in Excel (or otherwise) that excludes a specific instance? For example, I want to find and highlight any instances of "*DNA" within variable text blocks that are not "RDNA". Unfortunately, these text blocks are manually entered by people who do not follow directions and are allergic to grammar, punctuation, and common sense...and they can include both "RDNA" and "DNA" - which renders a not("RDNA") function moot because it will ignore legit entries of DNA if they also include RDNA.

nilodor 02-12-2018 03:30 PM

So if the following were each in one cell
RDNA
DNA
RDNA DNA

Rows 2 and 3 would both be highlighted?

Vince, Pt. II 02-12-2018 05:52 PM

Assuming each of those rows was one cell, yes. I think my only bet would be to replace all instances of "RDNA" with "" and then to re-filter for DNA, but I'm not sure I can do that without a manual process. Ideally this all happens behind the scenes (this is a Web Intelligence report spitting out an Excel sheet).

Bobble 02-13-2018 07:44 AM

Can you reasonably expect that it will be [space]DNA[space]? Can you search for "_DNA_" (where _ is a real space)?

Scarecrow 02-13-2018 09:17 AM

Would conditional formatting work?

Rule 1: Highlight all cells containing "*DNA"
Rule 2: Un-highlight all cells containing "RDNA"

Vince, Pt. II 02-13-2018 09:38 AM

Quote:

Originally Posted by Bobble (Post 3195020)
Can you reasonably expect that it will be [space]DNA[space]? Can you search for "_DNA_" (where _ is a real space)?


No. Due to weirdness with WEBI, a wildcard character requires there to actually BE a character there, so if the cell STARTS with "DNA" it won't be picked up because there is no character there. Similarly, assuming a space means you lose any "/DNA" "-DNA" or "(DNA)" type entries, which are legit.

Quote:

Originally Posted by Scarecrow (Post 3195025)
Would conditional formatting work?

Rule 1: Highlight all cells containing "*DNA"
Rule 2: Un-highlight all cells containing "RDNA"


Similar to the NOT logic, this would then un-highlight cells that contain both "RDNA" and "DNA."

Seems like such a simple problem, but it's been a tricky one. My stop-gap solution thus far has been very similar to Bobble's suggestion: I highlight anything with " DNA" and then manually scrub the rest. It's just foolishly time consuming on a weekly basis, and I know I can make it better.

Scarecrow 02-13-2018 09:48 AM

How about using the dropdown filter -> Text Filters -> Does Not Contain?

Vince, Pt. II 02-13-2018 10:05 AM

I'll play with it, but I think it will have the same constraints. For example, if I have the following text examples in three cells:

"XXXX RDNA @0934, DNA @0936"
"XXXX DNA @1031"
"XXXX RDNA @0934"

I want cells 1 & 2 highlighted/included and cell 3 ignored. The drop down filter would filter out everything but cell 2, because "does not contain RDNA" evaluates to false for 1 & 3. Since there is ALSO an instance of DNA in cell 1, however, I want this cell to be highlighted/included.

Bobble 02-13-2018 11:32 AM

My other suggestion would be to ask on the Excel subreddit. There's some devious excel-users on there.

Vince, Pt. II 02-13-2018 01:34 PM

Good suggestion, not sure why I haven't been over there myself. Thanks!

Vince, Pt. II 02-13-2018 01:51 PM

Great success! If I replace all "RDNA" instances in each cell (currently replacing with "----"), then re-screen for "DNA" I get the results I am looking for.

Vince, Pt. II 02-13-2018 01:54 PM

An example of what I mean based upon my previous example.

Original text:

"XXXX RDNA @0934, DNA @0936"
"XXXX DNA @1031"
"XXXX RDNA @0934"

After replacement:

"XXXX ---- @0934, DNA @0936"
"XXXX DNA @1031"
"XXXX ---- @0934"

Now safe to search for DNA!


All times are GMT -5. The time now is 06:21 PM.

Powered by vBulletin Version 3.6.0
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.