LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Replacing 1/3 and 2/3

Hey,


I have a VBA code, which return the result into a worksheet cell, in the
form of a test string.

The result string can be one of the following:

- "You need to use 1/4 of the basis"
- "You need to use 1/2 of the basis"
- "You need to use 3/4 of the basis"
- "You need to use 1/3 of the basis"
- "You need to use 2/3 of the basis"

It's the two last ones that causes me problems....


I want the text in the cell to be like this:

- "You need to use ¼ of the basis"
- "You need to use ½ of the basis"
- "You need to use ¾ of the basis"

So I simply use a code line like:

ReturnString = Replace(ReturnString," 1/2 "," ½ ")

And that's no problem with 1/4, 1/2 and 3/4, but when I try to make the
Replace with 1/3 and 2/3, all I get is a questionmark, in the Replace line,
when I try to copy the char for 1/3 into the line???

ReturnString = Replace(ReturnString," 1/3 "," ? ")

How to do it?


TIA,





 
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
Replacing ? ddate Excel Worksheet Functions 1 January 25th 07 01:31 AM
replacing , with nothing ? sverre Excel Programming 2 October 30th 06 02:04 PM
Replacing #DIV/0! With Just 0 Mike Excel Worksheet Functions 2 November 29th 05 11:30 PM
replacing #N/A with 0 Mark Excel Discussion (Misc queries) 3 April 7th 05 10:02 PM
Help Replacing all ( * ) with ( - ) Jeam Excel Discussion (Misc queries) 2 December 3rd 04 03:36 PM


All times are GMT +1. The time now is 05:44 PM.

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"