Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Not sure what my problem is...only thing different is I'm operating off of
Excel 2003 on XP...tried it again and same thing...just sits there...not even a flicker... "ND Pard" wrote: Sorry ... I entered the data in cells c2 & c3 as per your original post, named the range and ran the macro. It worked GREAT. I'm using Excel 2007 on Windows XP. "DipyDawg" wrote: Thanks for the response...unfortunately it didn't work...named the range...created the module, copied/pasted the macro into the module and went to run and nothing... "ND Pard" wrote: Try this: Name the range you want to have cleaned "rng_to_Clean". Then copy and paste the following macro into a new Module. Finally, run the macro. I think it'll do the trick. Good Luck. Sub Clean_Range() Dim c As Range Dim i As Integer Dim strNew As String strNew = "'" For Each c In Range("rng_to_Clean") For i = 1 To Len(c.Value) If IsNumeric(Mid(c, i, 1)) Or Mid(c, i, 1) = " " Then If strNew = "'" And Mid(c, i, 1) = " " Then Else strNew = strNew & Mid(c, i, 1) End If End If Next i c.Value = Trim(strNew) strNew = "'" Next c End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
select range containing data | Excel Discussion (Misc queries) | |||
When entering data into a range of cells, select the entire range. | Excel Discussion (Misc queries) | |||
In data range select final value. | Excel Discussion (Misc queries) | |||
Deleting cell data without deleting formula | Excel Discussion (Misc queries) | |||
Extracting/look up data from a list and select multiple instances | Excel Worksheet Functions |