Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 167
Default Character Locations in Strings

Is there a way to access individual characters within strings? In C++, you
can use brackets, but I don't know how to do it in VBA.

i.e. word = "string" -- to access the 3rd charcter, I would use word[3]
(or something like that) in C++. For VBA....?

Thanks.
Pflugs
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Character Locations in Strings

mid("string",3,1)

--
Tim Williams
Palo Alto, CA


"Pflugs" wrote in message ...
Is there a way to access individual characters within strings? In C++, you
can use brackets, but I don't know how to do it in VBA.

i.e. word = "string" -- to access the 3rd charcter, I would use word[3]
(or something like that) in C++. For VBA....?

Thanks.
Pflugs



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 167
Default Character Locations in Strings

Thanks!

"Tim Williams" wrote:

mid("string",3,1)

--
Tim Williams
Palo Alto, CA


"Pflugs" wrote in message ...
Is there a way to access individual characters within strings? In C++, you
can use brackets, but I don't know how to do it in VBA.

i.e. word = "string" -- to access the 3rd charcter, I would use word[3]
(or something like that) in C++. For VBA....?

Thanks.
Pflugs




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
Date Formating and building character strings C Brandt Excel Discussion (Misc queries) 5 August 18th 07 03:39 AM
testing for character strings within a cell MKB Excel Worksheet Functions 2 August 29th 06 06:54 PM
Character Locations in Strings Pflugs Excel Programming 3 July 6th 06 04:46 PM
Finding 13 character codes in text strings Bhupinder Rayat Excel Worksheet Functions 2 April 25th 06 05:14 PM
VB 255 character limit for strings Brett Excel Programming 7 January 11th 06 08:12 PM


All times are GMT +1. The time now is 08:25 PM.

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"