Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi!! I want to search an entire Worksheet and check if cells consists of only
numbers (all numeric). If a cell is only numeric then I want to search the cell for blanks and remove them. So far I can search and remove blanks but I cannot discriminate properly bewteen alpha and numeric. Please help me! I am clueless. My code so far is: Public Sub findAndRemoveBlanks() Dim WB As Workbook Dim SH As Worksheet Dim rng As Range Dim rCell As Range Set WB = Workbooks("Bok2") Set SH = WB.Sheets("Dimension") Set rng = SH.Range("A1:P300") For Each rCell In rng.Cells With rCell If Not IsEmpty(.Value) Then If Not .Value Like "*[A-Z]*" Then .Replace What:=" ", Replacement:="" End If End If End With Next rCell End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
remove duplicates except blanks | Excel Worksheet Functions | |||
remove blanks using formula | Excel Worksheet Functions | |||
Concatenate and remove blanks | Excel Worksheet Functions | |||
Find last used cell in row with blanks inbetween | Excel Programming | |||
remove blanks from a string of chars within a cell? | Excel Discussion (Misc queries) |