ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find any letters present in a range - an example (https://www.excelbanter.com/excel-programming/385691-find-any-letters-present-range-example.html)

[email protected]

Find any letters present in a range - an example
 
No question here, just a procedure for the archive and (apparently) a
victual for Senior Oh's ego feed. :)

Sub FindLetters()

'Evaluate all cells in selection that to find cells that
'contain standard English language alphabet letters
Dim cell As Range
For Each cell In Selection

If UCase(cell.Value) Like "*" &
"[ABCDEFGHIJKLMNOPQRSTUVWXYZ]" & "*" Then
MsgBox "Cell " & cell.Address & " contains a letter!"

End If
Next cell
End Sub


Find letters in a cell
Find any letters in a selection
evaluate for presence of letters


Tom Ogilvy

Find any letters present in a range - an example
 
Post really crappy code, expect it to be commented on. the purpose of the
forum is to help people, not provide them problematic examples.

Or are you creating your own Archive of shame?

Talk about egos - what is your purpose??? :-(

--
Regards,
Tom Ogilvy


" wrote:

No question here, just a procedure for the archive and (apparently) a
victual for Senior Oh's ego feed. :)

Sub FindLetters()

'Evaluate all cells in selection that to find cells that
'contain standard English language alphabet letters
Dim cell As Range
For Each cell In Selection

If UCase(cell.Value) Like "*" &
"[ABCDEFGHIJKLMNOPQRSTUVWXYZ]" & "*" Then
MsgBox "Cell " & cell.Address & " contains a letter!"

End If
Next cell
End Sub


Find letters in a cell
Find any letters in a selection
evaluate for presence of letters




All times are GMT +1. The time now is 06:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com