Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I've managed to get the following VBA code from another user and ameded
slightly for my use - this brings up a text box which shows the cell reference and contents in a pop up message box. Is there a way I can replace "'find é in text" with a generic statement which checks for all characters that aren't A-Z, a-z 0-9? The only other alternative would be to type them all out? How can I highlight a cell containing one of these un-required characters with a yellow background (or any colour) instead of it popping up in a message box? Best regards, Gareth Sub FindCellsWithAsterisks() 'find é in text Dim cell As Range, FirstAddress As String, FoundList As String With ActiveSheet.UsedRange 'use tilde to find é Set cell = .Find("~é", LookIn:=xlValues, SearchOrder:=xlByRows, _ LookAt:=xlPart) If Not cell Is Nothing Then FirstAddress = cell.Address '< Bookmark start point Do FoundList = FoundList & "Cell " & cell.Address(0, 0) & _ " =" & vbTab & cell & vbNewLine Set cell = .FindNext(cell) Loop Until cell Is Nothing Or cell.Address = FirstAddress End If End With 'show search results MsgBox FoundList Set cell = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Format cells for special characters | New Users to Excel | |||
Format cells for special characters | New Users to Excel | |||
Automatically highlight cells with special characters | Excel Discussion (Misc queries) | |||
special characters (little box) | Excel Discussion (Misc queries) | |||
REMOVE SPECIAL CHARACTERS FROM TEXT CELLS | Excel Worksheet Functions |