Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
JulieD,
I just discovered that Ragdyer posted an answer to you in the Misc group His answer is easier to implement. Multiple posts can aggravate people... Regards, Jim Cone San Francisco, CA "Jim Cone" wrote in message ... Julie, I assume you have leading or trailing spaces in Column B that you want to retain so... Select the range to trim or select multiple ranges and use this revised code. It first goes to each area selected and runs the Trim function and then moves to the next selected area and does the same. '------------------------ Sub GetThemCrittersII() Dim objCell As Range Dim objArea As Range For Each objArea In Selection.Areas For Each objCell In objArea If Not IsError(objCell) And Not objCell.HasFormula Then _ objCell.Value = Trim$(objCell.Value) Next 'objCell Next 'objArea Set objCell = Nothing Set objArea = Nothing End Sub '------------------------------- Regards, Jim Cone San Francisco, CA "JulieD" wrote in message ... Hi Jim thanks so much ... this has saved me HOURS of work ... is it possible to easily exclude a range - the used range of the workbook is A1:J464 (maybe more / less rows in the future) and i need to it for everything EXCEPT column B cheers JulieD - snip- |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find & Replace: find part cell, replace whole cell | Excel Worksheet Functions | |||
Find and Replace - Replace with Blank Space | Excel Discussion (Misc queries) | |||
Find and replace results can the appearance of find be different? | Excel Discussion (Misc queries) | |||
where to put results of find operation in find and replace functio | Excel Worksheet Functions | |||
find and replace - replace data in rows to separated by commas | Excel Worksheet Functions |