![]() |
Spaces in a cell
Hi is there a way to check if a cell has spaces in it ? If there is then can we remove the spaces. for eg. Logan Central Plaza ... <--- how can i remove the spaces to make it LoganCentralPlaza please Any idea Thanks -- kush2 ----------------------------------------------------------------------- kush28's Profile: http://www.excelforum.com/member.php...fo&userid=3103 View this thread: http://www.excelforum.com/showthread.php?threadid=51560 |
Spaces in a cell
On Wed, 22 Feb 2006 22:11:01 -0600, kush28
wrote: Hi is there a way to check if a cell has spaces in it ? If there is then can we remove the spaces. for eg. Logan Central Plaza ... <--- how can i remove the spaces to make it LoganCentralPlaza please Any idea Thanks K =SUBSTITUTE(A1," ","") --ron |
Spaces in a cell
To test whether a cell contains space, e.g. cell a1,
Dim a as boolean If instr(Range("A1").value," ") < 0 then a = true else a = false end if To remove all space in the selected cells, Selection.Cells.Replace What:=" ", Replacement:="" Regards, Edwin Tam http://www.vonixx.com "kush28" wrote: Hi is there a way to check if a cell has spaces in it ? If there is then can we remove the spaces. for eg. Logan Central Plaza ... <--- how can i remove the spaces to make it LoganCentralPlaza please Any idea Thanks K -- kush28 ------------------------------------------------------------------------ kush28's Profile: http://www.excelforum.com/member.php...o&userid=31036 View this thread: http://www.excelforum.com/showthread...hreadid=515607 |
Spaces in a cell
Please try
=trim(a1) Thanks kush28 wrote: Hi is there a way to check if a cell has spaces in it ? If there is then can we remove the spaces. for eg. Logan Central Plaza ... <--- how can i remove the spaces to make it LoganCentralPlaza please Any idea Thanks -- purplemx Message posted via http://www.officekb.com |
Spaces in a cell
thanx.... -- Pivotren ----------------------------------------------------------------------- Pivotrend's Profile: http://www.excelforum.com/member.php...nfo&userid=406 View this thread: http://www.excelforum.com/showthread.php?threadid=51560 |
All times are GMT +1. The time now is 08:49 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com