LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Len and InStr problem manipulating strings

On Sun, 22 Feb 2009 06:04:01 -0800, facmanboss
wrote:

Ron,
Thanks but I had already tried that Do Loop. I tried yours just to make
sure. Same behavoir. Doesn't work.

Here is an example:
"….2..A….4." becomes "….2.A….4."
Only the TWO periods Between "2" and "A" get replaced. No other combo does.


OK, I'm pretty sure I understand what is going on.

The issue is that there are NOT two *periods* prior to the "2" or between the
"A" and the "4".

What you are seeing is an ellipsis -- (ASCII code 133) plus a period. It may
look like 3 periods (4 all together), but it is only 2 characters: ASCII code
133 followed by a "."


Also,
I still don't get the InStr behavoir in one of my examples below.
Any more help appreciated. I'm at a deadend.
Thanks.


I suspect the same problem with your interpretation of your InStr behavior. The
ellipsis may look like three periods, but it is only one and will not be
recognized by code that is looking for a "period".

You should be able to make appropriate changes now.
--ron
 
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
Problem using the INSTR function in VBA [email protected] Excel Programming 1 March 23rd 07 08:12 AM
Manipulating Data Problem Jeff Excel Worksheet Functions 0 June 8th 06 04:28 AM
Manipulating Strings Leslie Coover Excel Programming 2 July 27th 05 06:45 AM
PivotTable and PivotCharts Problem - Manipulating in VBA Brad[_18_] Excel Programming 1 February 19th 04 11:22 AM
Instr function problem Ross Withey Excel Programming 9 November 14th 03 08:02 AM


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