PC Review


Reply
Thread Tools Rate Thread

2 columns w/ text data that i want to do a wildcard comparison

 
 
dellsilv
Guest
Posts: n/a
 
      27th May 2009
iN eXCEL, I HAVE 2 COLUMNS AS SUCH:

A A EXACTMATCH
A B NOMATCH
A1 1 PARTIALMATCH
IS MISS PARTIALMATCH
X NOMATCH

I need to do a wildcard comparison between column A to column B and place in
Column C the resulting match type.

 
Reply With Quote
 
 
 
 
Patrick Molloy
Guest
Posts: n/a
 
      28th May 2009
you can create a User Defined Function (aka UDF) for this as follows.

In a standard code module paste this:

Option Explicit
Function MatchType(textA As String, textB As String) As String
If textA = textB Then
MatchType = "EXACTMATCH"
ElseIf InStr(textA, textB) > 0 Then
MatchType = "PARTIALMATCH"
ElseIf InStr(textB, textA) > 0 Then
MatchType = "PARTIALMATCH"
Else
MatchType = "NOMATCH"
End If
End Function



"dellsilv" <(E-Mail Removed)> wrote in message
news:4FAD5B3C-33A9-4522-A69F-(E-Mail Removed)...
> iN eXCEL, I HAVE 2 COLUMNS AS SUCH:
>
> A A EXACTMATCH
> A B NOMATCH
> A1 1 PARTIALMATCH
> IS MISS PARTIALMATCH
> X NOMATCH
>
> I need to do a wildcard comparison between column A to column B and place
> in
> Column C the resulting match type.
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Two sets of XYZ data columns comparison Alllfff Microsoft Excel Worksheet Functions 0 30th Jun 2011 01:33 PM
Complex comparison of Columns of Data: Extracting unique records after comparison on 4 levels ap Microsoft Excel Programming 2 23rd Jan 2007 10:12 AM
Matching Data Columns for comparison =?Utf-8?B?Sk9ITg==?= Microsoft Excel Misc 0 8th Jan 2007 01:48 AM
Wildcard in conjunction with data comparison Tom Microsoft Excel Programming 3 4th Aug 2003 02:24 PM
Wildcard in conjunction with data comparison Tom Microsoft Excel Worksheet Functions 1 3rd Aug 2003 01:48 PM


Features
 

Advertising
 

Newsgroups
 


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