A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Identify text nums in scrambled fashion



 
 
Thread Tools Display Modes
  #1  
Old November 11th, 2009, 04:17 PM posted to microsoft.public.excel.misc
Max
external usenet poster
 
Posts: 8,574
Default Identify text nums in scrambled fashion

All nums are text nums

In A1:A3 would be 3 "winning" 4-digit text numbers, eg:

0044
1234
4233

In C1 down will be input 4 digit text nums such as:

0440
4120
2343
3324
etc

If the text nums in C1 down happen to contain the same 4 digits as in any of
the 3 winners in A1:A3, then to indicate an "x" in adjacent col D (otherwise
just leave it blank)

For the sample data, the results in col D would be:

0440 - x
4120
2343 - x
3324 - x

I'm game for any formula, udf or vba solution which can do the above
Insights welcomed. Thanks


  #2  
Old November 11th, 2009, 06:19 PM posted to microsoft.public.excel.misc
T. Valko
external usenet poster
 
Posts: 15,759
Default Identify text nums in scrambled fashion

Try this...

Assuming there are no empty cells within the range A1:A3.

In the formula, Nums refers to the range A$1:A$3.

Entered in D1 and copied down as needed:

=IF(FREQUENCY(LEN(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE (SUBSTITUTE(Nums,MID(C1,1,1),"",1),MID(C1,2,1),"", 1),MID(C1,3,1),"",1),MID(C1,4,1),"",1)),0),"x","")

--
Biff
Microsoft Excel MVP


"Max" wrote in message
...
All nums are text nums

In A1:A3 would be 3 "winning" 4-digit text numbers, eg:

0044
1234
4233

In C1 down will be input 4 digit text nums such as:

0440
4120
2343
3324
etc

If the text nums in C1 down happen to contain the same 4 digits as in any
of the 3 winners in A1:A3, then to indicate an "x" in adjacent col D
(otherwise just leave it blank)

For the sample data, the results in col D would be:

0440 - x
4120
2343 - x
3324 - x

I'm game for any formula, udf or vba solution which can do the above
Insights welcomed. Thanks




  #3  
Old November 11th, 2009, 10:28 PM posted to microsoft.public.excel.misc
Max
external usenet poster
 
Posts: 8,574
Default Identify text nums in scrambled fashion

Brilliant, Biff. Works great
Many thanks


  #4  
Old November 11th, 2009, 11:45 PM posted to microsoft.public.excel.misc
T. Valko
external usenet poster
 
Posts: 15,759
Default Identify text nums in scrambled fashion

You're welcome, Max.

Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Max" wrote in message
...
Brilliant, Biff. Works great
Many thanks



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.