Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Can I find a string with or without a space after the last charact

I have a word in a Cell. I copy it in " Find". I Search in another Sheet that
word. If I have extra spaces before or after it I can not find it often it
exists. The word changed. I tried to write a macro but it doesnt work. Can
helps me someone?
Thanks millions.
Emil

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 380
Default Can I find a string with or without a space after the last charact

Try setting the Lookin value to xlPart in the Find statement.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"emil" wrote in message
...
I have a word in a Cell. I copy it in " Find". I Search in another Sheet

that
word. If I have extra spaces before or after it I can not find it often it
exists. The word changed. I tried to write a macro but it doesn't work.

Can
helps me someone?
Thanks millions.
Emil



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can I find a string with or without a space after the last charact


not a very high tech way but ......

the find command so long as the 'match entire contents' box is not
ticked would not worry about the spaces.

eg if your cell you are copying is 'test ' on the other sheet if you
search for 'test' it should find all instances regardless of spaces.

also you have the chance to use the TRIM command, as it will strip the
spaces off the end of cells.

one thing to watch out for is if the second sheet you are looking on
has the word as the result of a formula as sometimes it searches the
formula code and not the results


--
lister_d_000169
------------------------------------------------------------------------
lister_d_000169's Profile: http://www.excelforum.com/member.php...o&userid=32950
View this thread: http://www.excelforum.com/showthread...hreadid=548349

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Can I find a string with or without a space after the last cha

Thank very much, but I want to write a macro

"Bob Phillips" a scris:

Try setting the Lookin value to xlPart in the Find statement.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"emil" wrote in message
...
I have a word in a Cell. I copy it in " Find". I Search in another Sheet

that
word. If I have extra spaces before or after it I can not find it often it
exists. The word changed. I tried to write a macro but it doesn't work.

Can
helps me someone?
Thanks millions.
Emil




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Can I find a string with or without a space after the last cha


Thank very mach, I shall try this
Emil

"lister_d_000169" a scris:


not a very high tech way but ......

the find command so long as the 'match entire contents' box is not
ticked would not worry about the spaces.

eg if your cell you are copying is 'test ' on the other sheet if you
search for 'test' it should find all instances regardless of spaces.

also you have the chance to use the TRIM command, as it will strip the
spaces off the end of cells.

one thing to watch out for is if the second sheet you are looking on
has the word as the result of a formula as sometimes it searches the
formula code and not the results


--
lister_d_000169
------------------------------------------------------------------------
lister_d_000169's Profile: http://www.excelforum.com/member.php...o&userid=32950
View this thread: http://www.excelforum.com/showthread...hreadid=548349




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Can I find a string with or without a space after the last cha

TRIM is very good
Thank very mach
Emil

"emil" a scris:


Thank very mach, I shall try this
Emil

"lister_d_000169" a scris:


not a very high tech way but ......

the find command so long as the 'match entire contents' box is not
ticked would not worry about the spaces.

eg if your cell you are copying is 'test ' on the other sheet if you
search for 'test' it should find all instances regardless of spaces.

also you have the chance to use the TRIM command, as it will strip the
spaces off the end of cells.

one thing to watch out for is if the second sheet you are looking on
has the word as the result of a formula as sometimes it searches the
formula code and not the results


--
lister_d_000169
------------------------------------------------------------------------
lister_d_000169's Profile: http://www.excelforum.com/member.php...o&userid=32950
View this thread: http://www.excelforum.com/showthread...hreadid=548349


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
Number of space in a string [email protected] Excel Discussion (Misc queries) 5 November 8th 06 11:15 PM
How do i get the last position of a char (space) in a string? EsPoNjOsO Excel Worksheet Functions 1 October 12th 06 11:55 AM
NEED HELP-----Removing a space at the end of a string of character FRS Excel Discussion (Misc queries) 7 April 13th 06 03:57 AM
erase all space characters into string Maileen[_2_] Excel Programming 4 January 16th 05 09:10 PM
Replace Space charcter in a string variable pikus Excel Programming 14 July 23rd 04 04:05 PM


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