Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Ignoring text and spaces ???

im trying to join 2 fields together, but only taking the first
charcters of the first field and the first 3 characters of the 2n
field. I can do this using the =replace(......) function, but i want t
be able to ignore 'spaces' in the fields aswell as common text such a
'A' and 'And'.
heres an example
Field1 = The Company Field2= Melbourne
at the moment using the replace function i can get it to look like thi
"The CMel" as you can see it takes the first 5 and first 3 letter
respectively from each field. I want to ignore 'spaces' and commo
text, the result should be 'CompaMel'.
Is there any way i can do this??

thanks
Michael

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 634
Default Ignoring text and spaces ???

=LEFT(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE( A2," A ",""),"
",""),"And",""),"The",""),5)&LEFT(SUBSTITUTE(SUBST ITUTE(SUBSTITUTE(SUBSTITUTE(B2
," A ","")," ",""),"And",""),"The",""),3)

should capture most, but will not strip out "A " if the company names begins
with "A ", eg A Company.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



"watto84 " wrote in message
...
im trying to join 2 fields together, but only taking the first 5
charcters of the first field and the first 3 characters of the 2nd
field. I can do this using the =replace(......) function, but i want to
be able to ignore 'spaces' in the fields aswell as common text such as
'A' and 'And'.
heres an example
Field1 = The Company Field2= Melbourne
at the moment using the replace function i can get it to look like this
"The CMel" as you can see it takes the first 5 and first 3 letters
respectively from each field. I want to ignore 'spaces' and common
text, the result should be 'CompaMel'.
Is there any way i can do this??

thanks
Michael.


---
Message posted from http://www.ExcelForum.com/



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.594 / Virus Database: 377 - Release Date: 24/02/2004


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
Ignoring Text in a formula Anto111 Excel Discussion (Misc queries) 2 June 4th 08 08:48 AM
SUM - but ignoring text in the data range carol Excel Discussion (Misc queries) 3 May 8th 08 01:05 PM
Graph while ignoring text but not changing text to #NA haruun Charts and Charting in Excel 1 April 29th 08 01:49 AM
Ignoring Cells with Only Spaces Heliocracy Excel Worksheet Functions 5 April 3rd 07 05:18 PM
can you find specific text in a string ignoring any other text chriscp Excel Discussion (Misc queries) 1 September 18th 05 09:54 PM


All times are GMT +1. The time now is 08:57 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"