Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Samantha,
Try: '============= Public Sub Tester() Dim WB As Workbook Dim SH As Worksheet Dim rng As Range Dim rCell As Range Set WB = Workbooks("YourBook.xls") '<<===== CHANGE Set SH = WB.Sheets("Sheet1") '<<===== CHANGE Set rng = SH.Range("A1:D30") '<<===== CHANGE 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 '<<============= -- --- Regards, Norman "SamanthaK" wrote in message ... How do you search an entier spreadsheet and do the following: 1) Check if the contents of a cell is numeric? 2) If content is numeric then search for blanks (" ") and replace them with nothing (""). E.g. I hace a number in a cell written like: 1000 22 458 but want to convert it to 100022458. I do not want text like: 'Market value' to be replaced by 'Marketvalue'. Please help me on this one!!! -- I am very thankful for any fast assistance! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I replace the #DIV/0! with blanks in the cells? | Excel Discussion (Misc queries) | |||
How to find and replace with blanks or actually delete row | Excel Worksheet Functions | |||
replace blanks using formula | Excel Worksheet Functions | |||
Need to get rid of 0's and replace with Blanks | Excel Worksheet Functions | |||
replace "#DIV/0!" error with blanks | Excel Worksheet Functions |