Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Replace Functions not working

I have some code which grabs the values from some combo
boxes and concanates them togethor with underscores
between each value. This is variable 1. I then have a
replace code which examines this string looking for
spaces and replaces them with nothing, "". This is
variable 2. I then have another replace function which
looks for some specific text and replaces that if it
finds it. Variable 3. Lastly the final variable is
assigned to the value of a text box.

What is happening is the first replace function is
working but all the others are not. If i comment out the
first one, the second one works and so forth. A sample
of the code is included below.

FN1 = Division.Value & "_" & Branch.Value & "_" & _
System.Value
FN2 = Replace(FN1, " ", "") 'Remove spaces
FN3 = Replace(FN2, "Operator", "O")
FN4 = Replace(FN3, "Programmable", "P")
Sheet1.FileName.Text = FN4

What can I do so that all replace functions work. I also
wish to include more replace functions.

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Replace Functions not working

Hello Neil,
something must be wrong with your UDF(?) replace function. Would you mind posting it?

One of the things that come to my mind: Don't you just replace the "O" in "Operator" with "O"? It looks that the function does not work, but it works. Only it does not do what you intend.
Regards
Martin

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
Replace ; with , in functions Emece Excel Discussion (Misc queries) 1 March 24th 10 05:23 PM
Find and Replace function not working wt.pm Excel Discussion (Misc queries) 2 April 14th 09 05:16 PM
Excel 2002: Why Find and Replace not working? Mr. Low Excel Discussion (Misc queries) 6 January 6th 09 03:37 PM
Find replace in functions J.Mart Excel Discussion (Misc queries) 2 November 18th 07 04:10 AM
Replace menu command not working RS Excel Discussion (Misc queries) 2 January 29th 07 05:57 PM


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