How to search for random patterns within a column

Frustrated_excel274

New Member
Joined
Feb 12, 2022
Messages
3
Office Version
  1. 2010
Platform
  1. Windows
Hi All, I'm totally lost and have been searching for 2 days on how to do this. I have an excel spreadsheet of with each cell containing random numbers and letters. I want do a search that will compare the cells and automatically find any 5 character patterns. Case sensitivity doesn't matter. Example:
A1: FeexV6bAHb8ybZjq
A2: iVkebCz8JfEEXvgkPiM
A3: hg363dRjUgq2feExvXL

I would want a search function that would output "feexv" because it is the most common 5 character set found. Is there a way to do this?
 
I have a perfectly functional solution, ....
I agree that you have a suggestion that may suit the OP, it is just that the rule asks you to post your solution in the forum, the reason being that other forum users can search for answers without asking the same question and also the OP or other users can access the solution even if their workplace bars downloads such as yours - and they can get the solution for more than 7 days.

.. am prevented from sharing it.
Not so, I would have thought that with 11 years of forum membership you would have seen plenty of solutions posted in the forum.
It is easy enough to post the solution here with XL2BB as below. If you are unable to use XL2BB, you could at least post the formulas for B2, C2, D2, E2, A7 & B7 and describe where to copy them to.

Formula suggestion by @gurs

Cell Formulas
RangeFormula
B2:B4B2=LEN(A2)
C2:C4C2=B2-4
D2:D4D2=LEFT(A2,5)
E2:S4E2=IF(COLUMN()-3>$C2,"",MID($A2,COLUMN()-3,5))
A7:A47A7=INDIRECT(TEXT(MIN(IF(($D$2:$S$4<>"")*(COUNTIF(A$6:A6,$D$2:$S$4)=0),ROW($2:$4)*100+COLUMN($D:$S),7^8)),"R0C00"),)&""
B7:B47B7=IF(A7="","",COUNTIFS($D$2:$S$4,A7))
Press CTRL+SHIFT+ENTER to enter array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B7:B57Other TypeColor scaleNO
 
Upvote 0

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
i'm sure with OP's excel-2010 and all those matrixformulas, that 's not really a solid solution.
Your result is an unsorted list of unique blobs (here with only 3 cells of 18 characters, you needed at least minimum 42 of those matrixformulas). That becomes quickly too much and too slow.
Afterwards you still have to find the most frequent with possible equal number.
OP wanted a solution and even if it was VBA, it was okay.
Imho, VBA is the only solution for this job in a 2010-version.
 
Upvote 0
Formula suggestion by @gurs
Thanks for posting that for me. Just a lot more work for a less-proficient person seeking help than a functioning workbook. I get your point regarding the preferability of having files that are proposed solutions be available indefinitely, which makes sense. I could swear you used to be able to attach xls files to a post here, but maybe I am just confusing Mrexcel with some other forum.
 
Upvote 0
indeed, you can attach xls and other files here.
Use the link-symbol (CTRL+K), just left of the smiley-icon, while you're posting.
When you use that one, copy the link-string in there.
But indeed, the site prefers also the other solution with for example XL2BB.
 
Upvote 0
Use the link-symbol (CTRL+K), just left of the smiley-icon, while you're posting.
When you use that one, copy the link-string in there.
Apologies for being dense about this, but what is the "link-string" for a file on my local hard drive?
 
Upvote 0
indeed, you can attach xls and other files here.
No you can't. You can upload files to a share site & post a link to them (which is what gurs has already done), but you cannot attach them to this site.
 
Upvote 0
Peter has already mentioned why in post#6.
 
Upvote 0
Peter has already mentioned why in post#6.
In post #6, @Peter_SSs referred me to rule #4, which says in relevant part: "please do not answer questions by creating solutions elsewhere and then referencing those solutions via file links". Yet then in post #14, @BSALV suggests that I post a link to a file shared on another site, and in post #16 you said it was acceptable to "upload files to a share site & post a link to them".

I hope you understand my confusion. How can it be a TOS violation to
"answer questions by creating solutions elsewhere and then referencing those solutions via file links",​
but acceptable to
"upload files to a share site & post a link to them"?​
Aren't those two phrases saying the same thing?
 
Upvote 0
The rule is quite clear, it says
Likewise, please do not answer questions by creating solutions elsewhere and then referencing those solutions via file links. We ask that you answer the question within the thread itself
In post#16 I was not saying it was acceptable to answer questions, simply by supplying a file. I was saying that you cannot upload files to this site, but would need to use a share site.
 
Upvote 0

Forum statistics

Threads
1,215,723
Messages
6,126,470
Members
449,315
Latest member
misterzim

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