Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 2 columns w/ text data that i want to do a wildcard comparison

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default 2 columns w/ text data that i want to do a wildcard comparison

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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Complex comparison of Columns of Data: Extracting unique records after comparison on 4 levels ap Excel Programming 2 January 23rd 07 10:12 AM
Matching Data Columns for comparison John Excel Discussion (Misc queries) 1 January 8th 07 06:24 AM
ow to create comparison chart using text as value data? deejohn525 Charts and Charting in Excel 1 April 27th 06 12:51 PM
Using wildcard in VBA comparison? need a hint please. KR Excel Programming 5 May 3rd 05 09:00 PM
Wildcard in conjunction with data comparison Tom Excel Programming 3 August 4th 03 02:24 PM


All times are GMT +1. The time now is 08:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"