Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 149
Default Upper Case and Lower Case

The below function and snipplet will find the string "AD" fine. My problem
is that I have a cell before the cell containing "AD" that contains the word
"Grade". Is there a way to use either LCASE or UCASE to differentiate
between lower case and upper case strings? If so, should I modify the
FINDCELL function to use UCase or LCase?


Set cell = FindCell("*" & sSearchString & "*", Sheets(1).Cells)



Function FindCell(searchFor As String, _
searchRange As Range) As Range

Application.DisplayAlerts = False
With searchRange

Set FindCell = .Find(what:=searchFor, After:=.Cells(.Cells.Count), _
LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)

End With
End Function


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Upper Case and Lower Case

Why not set matchcase to True?


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 149
Default Upper Case and Lower Case

Can you give me some syntax or point me to where i can find an explanation
of matchcase?

"Claud Balls" wrote in message
...
Why not set matchcase to True?


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Upper Case and Lower Case

Hi Scott,

Look at "Find Method" in VBA help.

The MatchCase argument can only take the values True or False.

---
Regards,
Norman



"scott" wrote in message
...
Can you give me some syntax or point me to where i can find an explanation
of matchcase?

"Claud Balls" wrote in message
...
Why not set matchcase to True?


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Upper Case and Lower Case

Look at your own syntax. I have cut out the part where you have set
MatchCase to False:

SearchDirection:=xlNext, MatchCase:=False)



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 149
Default Upper Case and Lower Case

that's for pointing out the obvious.

"Claud Balls" wrote in message
...
Look at your own syntax. I have cut out the part where you have set
MatchCase to False:

SearchDirection:=xlNext, MatchCase:=False)



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



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
Changing multiple cell text from lower case to upper case Patti Excel Discussion (Misc queries) 2 January 4th 08 08:35 PM
Changing file in all upper case to upper and lower case Sagit Excel Discussion (Misc queries) 15 May 30th 07 06:08 AM
Change the text from lower case to upper case in an Excel work boo dave01968 Excel Discussion (Misc queries) 2 December 9th 05 09:09 AM
How do I change a column in Excel from upper case to lower case? Debbie Kennedy Excel Worksheet Functions 3 May 2nd 05 06:57 PM
How do I change existing text from lower case to upper case CT Cameron Excel Discussion (Misc queries) 2 November 30th 04 01:07 AM


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