#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 58
Default Match a text

Hi,

I have 1 column which contains address and city name now i want a formula
which shuold look for city name and shud return the same city in next col.
This i can do using filters (which contains = XXX and i can put the values in
the next col) but pls tell me how to do automatically using the formula.

Would appreciate the quick response.

Thanks in advance.

Example :

# 49, MG road, Chennai now I shud look for the string "Chennai" and shud
put the value "Chennai" in B1
81, II cross, viveknagar, Hosur
123, ALS Nagar, Chennai
555, Kormangla, Chennai


-Christ.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Match a text

Hi Christopher

One way. assuming you have a blank sheet with the data in column A.
Copy column A and paste to Column B.
Select column B.DataText to ColumnsdelimitedDelimiter CommaNextselect
first columnchoose do not Importrepeat for other columns other than
CityFinish

--
Regards
Roger Govier



"Christopher Naveen" wrote in
message ...
Hi,

I have 1 column which contains address and city name now i want a formula
which shuold look for city name and shud return the same city in next col.
This i can do using filters (which contains = XXX and i can put the values
in
the next col) but pls tell me how to do automatically using the formula.

Would appreciate the quick response.

Thanks in advance.

Example :

# 49, MG road, Chennai now I shud look for the string "Chennai" and shud
put the value "Chennai" in
B1
81, II cross, viveknagar, Hosur
123, ALS Nagar, Chennai
555, Kormangla, Chennai


-Christ.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 38
Default Match a text

That is nice solution but Christophe rshould AFTER DataText to columns
operation use TRIM function on columns with city names because they will
have space in front of city name.
so, in column C function should be: =trim(b1).
And, there is no need for copiing data from A to B. Text to columns works if
you select column A and use it.

Hope this helps

"Roger Govier" <rogerattechnology4NOSPAMu.co.uk wrote in message
...
Hi Christopher

One way. assuming you have a blank sheet with the data in column A.
Copy column A and paste to Column B.
Select column B.DataText to ColumnsdelimitedDelimiter CommaNextselect
first columnchoose do not Importrepeat for other columns other than
CityFinish

--
Regards
Roger Govier



"Christopher Naveen" wrote
in message ...
Hi,

I have 1 column which contains address and city name now i want a formula
which shuold look for city name and shud return the same city in next
col.
This i can do using filters (which contains = XXX and i can put the
values in
the next col) but pls tell me how to do automatically using the formula.

Would appreciate the quick response.

Thanks in advance.

Example :

# 49, MG road, Chennai now I shud look for the string "Chennai" and shud
put the value "Chennai" in
B1
81, II cross, viveknagar, Hosur
123, ALS Nagar, Chennai
555, Kormangla, Chennai


-Christ.





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,480
Default Match a text

Hi Sasa
You are quite right about the leading space, which if it is a problem can be
removed with Trim, as you say.

I am aware that there is no need to copy the data before parsing with text
to columns, but I had assumed that Christopher would want to keep his source
data intact, as there is other information there that he might need.


--
Regards
Roger Govier



"Sasa Stankovic" wrote in message
...
That is nice solution but Christophe rshould AFTER DataText to columns
operation use TRIM function on columns with city names because they will
have space in front of city name.
so, in column C function should be: =trim(b1).
And, there is no need for copiing data from A to B. Text to columns works
if you select column A and use it.

Hope this helps

"Roger Govier" <rogerattechnology4NOSPAMu.co.uk wrote in message
...
Hi Christopher

One way. assuming you have a blank sheet with the data in column A.
Copy column A and paste to Column B.
Select column B.DataText to ColumnsdelimitedDelimiter
CommaNextselect first columnchoose do not Importrepeat for other
columns other than CityFinish

--
Regards
Roger Govier



"Christopher Naveen" wrote
in message ...
Hi,

I have 1 column which contains address and city name now i want a
formula
which shuold look for city name and shud return the same city in next
col.
This i can do using filters (which contains = XXX and i can put the
values in
the next col) but pls tell me how to do automatically using the formula.

Would appreciate the quick response.

Thanks in advance.

Example :

# 49, MG road, Chennai now I shud look for the string "Chennai" and shud
put the value "Chennai"
in B1
81, II cross, viveknagar, Hosur
123, ALS Nagar, Chennai
555, Kormangla, Chennai


-Christ.







  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Match a text

On Thu, 27 Sep 2007 00:09:00 -0700, Christopher Naveen
wrote:

Hi,

I have 1 column which contains address and city name now i want a formula
which shuold look for city name and shud return the same city in next col.
This i can do using filters (which contains = XXX and i can put the values in
the next col) but pls tell me how to do automatically using the formula.

Would appreciate the quick response.

Thanks in advance.

Example :

# 49, MG road, Chennai now I shud look for the string "Chennai" and shud
put the value "Chennai" in B1
81, II cross, viveknagar, Hosur
123, ALS Nagar, Chennai
555, Kormangla, Chennai


-Christ.



Assuming your City name always follows the last comma in the string, then the
following should do this:

=TRIM(MID(A1,FIND(CHAR(1),SUBSTITUTE(
A1,",",CHAR(1),LEN(A1)-LEN(SUBSTITUTE(
A1,",",""))))+1,255))


--ron
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
Finding a Text match Richard Excel Discussion (Misc queries) 0 August 22nd 06 05:41 PM
Lookup? Match? pulling rows from one spreadsheet to match a text f cjax Excel Worksheet Functions 3 July 21st 06 02:51 PM
delete all text that match e3grk Excel Worksheet Functions 1 March 31st 05 06:48 PM
How to match two different cells text, if the text is not in the . LEsa Excel Worksheet Functions 1 March 13th 05 02:46 AM
match cell text with text in formula Todd L. Excel Worksheet Functions 3 December 9th 04 08:11 PM


All times are GMT +1. The time now is 03:06 PM.

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"