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: 5
Default Return two mid functions as one string.

I have this code which attempts to return parts of a
string, separated by a period:

For Each c In Range(RefEdit1.Value).Cells
c.Value = Str(Mid(c.Value, 5, 5) & "." & Mid(c.Value,
1, 2))

When I take out the & ".", I get what I expect (the fifth
through ninth character of the string, followed by the
first two characters of the same string). But when I have
the & "." in the code (my intention is to have a dot
(period) between the two sections of text), I get only the
first Mid function returned (characters five through
nine). Can anyone help me with why this is happening? I
thought that by enclosing my period in double quotes that
the program would undersand it to mean text, but
apparently it's considering it something else.

Thanks,

Keith Lorenzen

 
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
help with string functions please KRK New Users to Excel 4 June 29th 09 12:36 PM
String functions in VB macro Aerojade Excel Discussion (Misc queries) 6 October 3rd 08 02:36 PM
String of functions confusion - please help Ashlee Excel Discussion (Misc queries) 2 November 10th 07 05:22 PM
return partial string alex Excel Worksheet Functions 5 July 20th 07 11:41 AM
STRING functions anar_baku Excel Worksheet Functions 4 November 8th 05 05:05 PM


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