Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Looping Text

How can you return the next letter in a sequence

Ie

txt = a+
would equal b, then c then d etc..
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Looping Text

Hi
maybe something like
txt=chr(asc(txt)+1)

--
Regards
Frank Kabel
Frankfurt, Germany


Bob Myles wrote:
How can you return the next letter in a sequence?

Ie:

txt = a+1
would equal b, then c then d etc..

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Looping Text

Awesome! Thank you!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 218
Default Looping Text

Assuming the current letter is derived from the active
cell:

Sub NextLetter()
Dim txt As String
txt = ActiveCell.Text
txt = Chr(Asc(txt) + 1)
MsgBox txt
End Sub

Regards,
Greg

-----Original Message-----
How can you return the next letter in a sequence?

Ie:

txt = a+1
would equal b, then c then d etc..
.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Looping Text

Awesome! Thank you! I just couldn't get the syntax!! Thanks!


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
Looping input from a text box morry[_7_] Excel Programming 0 February 13th 04 09:13 PM
looping through text boxes Ian Mangelsdorf Excel Programming 1 January 20th 04 06:11 AM
Looping Syd[_4_] Excel Programming 1 December 11th 03 11:17 PM
building a text string while looping though a worksheet Phillips Excel Programming 4 December 10th 03 08:31 AM
Looping through Text boxes Fred[_9_] Excel Programming 0 July 9th 03 03:06 AM


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