Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I remove leading spaces and leave the remianing spaces w | Excel Worksheet Functions | |||
how do I delete the last two spaces in a cell | Excel Discussion (Misc queries) | |||
Adding spaces to a cell | Excel Discussion (Misc queries) | |||
Remove all spaces in a cell... | Excel Worksheet Functions | |||
Add spaces to cell | Excel Programming |