Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Please help ... comparing text

I have an Excel spreadsheet that has 2 columns so far ...

Col A = suburb name in full
Col B = an abbreviated version of the suburb (this appears on the same row
as the full name that appears in Col A)

I now need to enter hundreds of abbreviated suburb names - multiple and in
no particular order (which will be entered into a new column - Col C)

Question: is there a way I can "ask" ... if Col C matches any in Col B (not
case-sensitive preferably), then insert Col A (full suburb) into a 4th (new)
column (Col D)?

I apologise, I know this is a little confusing, but I would appreciate any
advice/help - I have searched everywhere and can't seem to find an answer.

--
Sally M, Queensland, Australia
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Please help ... comparing text

One way ..

Assuming data starts in row2 down

Put in D2:
=IF(ISNA(MATCH(C2,B:B,0)),"",INDEX(A:A,MATCH(C2,B: B,0)))
Copy down as far as required. If there's no match found for the lookup
values in col C, blanks: "" will be returned. MATCH is not case sensitive, as
desired.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


"Sally M." wrote:

I have an Excel spreadsheet that has 2 columns so far ...

Col A = suburb name in full
Col B = an abbreviated version of the suburb (this appears on the same row
as the full name that appears in Col A)

I now need to enter hundreds of abbreviated suburb names - multiple and in
no particular order (which will be entered into a new column - Col C)

Question: is there a way I can "ask" ... if Col C matches any in Col B (not
case-sensitive preferably), then insert Col A (full suburb) into a 4th (new)
column (Col D)?

I apologise, I know this is a little confusing, but I would appreciate any
advice/help - I have searched everywhere and can't seem to find an answer.

--
Sally M, Queensland, Australia

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Please help ... comparing text

try this
Sub findmatch1()
Columns(4).ClearContents
For Each i In Range("c1:c" & Cells(Rows.Count, "c").End(xlUp).Row)
With Range("b1:b" & Cells(Rows.Count, "b").End(xlUp).Row)
Set c = .Find(i, Lookat:=xlWhole, MatchCase:=False)
If Not c Is Nothing Then
firstAddress = c.Address
Do
i.Offset(, 1) = c
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With
Next
End Sub

--
Don Guillett
SalesAid Software

"Sally M." wrote in message
...
I have an Excel spreadsheet that has 2 columns so far ...

Col A = suburb name in full
Col B = an abbreviated version of the suburb (this appears on the same row
as the full name that appears in Col A)

I now need to enter hundreds of abbreviated suburb names - multiple and in
no particular order (which will be entered into a new column - Col C)

Question: is there a way I can "ask" ... if Col C matches any in Col B
(not
case-sensitive preferably), then insert Col A (full suburb) into a 4th
(new)
column (Col D)?

I apologise, I know this is a little confusing, but I would appreciate any
advice/help - I have searched everywhere and can't seem to find an answer.

--
Sally M, Queensland, Australia


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
Comparing cells with text Mortir Excel Worksheet Functions 4 January 3rd 07 10:54 PM
comparing text cells Comander Excel Worksheet Functions 2 June 5th 06 10:00 PM
Comparing Two Columns of Text sailortigger Excel Discussion (Misc queries) 2 June 21st 05 08:11 PM
Comparing text in columns Lear Excel Discussion (Misc queries) 1 June 8th 05 09:35 PM
Comparing text fields [email protected] Excel Worksheet Functions 3 May 28th 05 02:56 PM


All times are GMT +1. The time now is 06:21 AM.

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

About Us

"It's about Microsoft Excel"