LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel VBA - Searching long words

sStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvw xyz"
sStr1 = Left(sStr,31)
? sStr
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwx yz
? sStr1
ABCDEFGHIJKLMNOPQRSTUVWXYZabcde


--
Regards,
Tom Ogilvy

"ozcank " wrote in message
...
Good thinking, I neglected that small factor. I have the following code,
which selects the name of the cell:

Private Sub getNames()
Dim intRow As Integer, wsMain As Worksheet
Dim strReadName As String

Set wsMain = ActiveWorkbook.Worksheets("ufioverdue")
intIdx = 0
intRow = 2
With wsMain
Do
strReadName = .Cells(intRow, 2)
strNames(intIdx) = strReadName

Do
intRow = intRow + 1
Loop Until strReadName < .Cells(intRow, 2)

intIdx = intIdx + 1

Loop While .Cells(intRow, 2) < ""
End With
intIdx = intIdx - 1

End Sub

What would I have to alter so that it would only select the first 31
characters of a cell? ny ideas?

Cheers


---
Message posted from http://www.ExcelForum.com/





 
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
Searching quicker within long dropdownlist Blackbird Excel Worksheet Functions 1 March 10th 09 04:54 PM
Searching long data base list. vvsmith Excel Worksheet Functions 2 November 6th 07 07:23 PM
Searching Text that contains particular WORDS. Abdullah Kajee Excel Worksheet Functions 9 August 27th 07 07:52 AM
Replace a long list of abbreviations with full words in Excel jgundel Excel Worksheet Functions 3 February 7th 06 07:11 PM
Searching for a words in a column from a list of words. Scott Excel Programming 5 August 15th 03 02:40 PM


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