LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Variable text manipulation

Private Function CheckedSummons(StringtoCheck As String) As String
Dim cnt As Integer
Dim NewText As String
Dim SummonsInformation As String
Dim rngFound As Range

Set rngFound = Range("A6:AX4500").Find(StringtoCheck, _
LookIn:=xlValues)

For cnt = 25 To 41
NewText = rngFound.Offset(0, cnt).Value
If NewText < "" Then
If SummonsInformation = "" Then
SummonsInformation = NewText
Else
SummonsInformation = SummonsInformation & vbLf & NewText
End If
End If
Next cnt

CheckedSummons = SummonsInformation

End Function

HTH,
Bernie
MS Excel MVP


wrote in message
...
Whats the easiest way to do this I am having a hard time trying to
figure this one out :( Please Help!!!

Private Function CheckedSummons(StringtoCheck As String)
Dim cnt As Integer
Dim NewText As String
Dim SummonsInformation as String
For cnt = 25 To 41
NewText = Range("A6:AX4500").Find(StringtoCheck,
LookIn:=xlValues).Offset(0, cnt)
If NewText < "" Then
' If Newtext is not nothing then Save Whats Already in
SummonsInformation, Add a NewLine
' and Add Newtext to SummonsInformation
end if
next cnt

End Function



 
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
Text manipulation paulinoluciano Excel Worksheet Functions 5 April 18th 06 01:24 AM
For better Performance in VBA for Excel - Strings manipulation OR Objects manipulation vmegha Excel Programming 2 December 19th 05 12:14 AM
text manipulation eenstudent Excel Worksheet Functions 5 July 13th 05 10:23 PM
Variable Manipulation Arturo Excel Programming 2 December 8th 04 05:55 PM
Text manipulation Ryan[_7_] Excel Programming 3 December 9th 03 01:18 PM


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