Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I have a text file from main frame which i am importing into excel. The problem i have is, some of the cells have 256 spaces in them,i want to delete them by code.. I need to find these cells which are having 256 spaces in 31 columns and 'n' number of rows. Can any one suggest some idea/code please Thanks inadvance |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This code replaces 256 spaces with nothing
Need to do this in 2 steps as trying to replace 256 spaces in one ste gives an error message... 255 seems to be the maximum Sub Macro1() Sheets("SHEET1").Cells.Replace What:=Space(156), Replacement:="" LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False Sheets("SHEET1").Cells.Replace What:=Space(100), Replacement:="" LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False End Su -- Message posted from http://www.ExcelForum.com |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks very much...
But I want i dont want to replace 256 space but i want to clear those cells... how to do if i do not know how many blank spaces are there any more ideas please -----Original Message----- This code replaces 256 spaces with nothing Need to do this in 2 steps as trying to replace 256 spaces in one step gives an error message... 255 seems to be the maximum Sub Macro1() Sheets("SHEET1").Cells.Replace What:=Space(156), Replacement:="", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False Sheets("SHEET1").Cells.Replace What:=Space(100), Replacement:="", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False End Sub --- Message posted from http://www.ExcelForum.com/ . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting spaces in blank cells | Excel Discussion (Misc queries) | |||
finding and deleting cells from one excel sheet to another | Excel Discussion (Misc queries) | |||
Deleting blank spaces in cells | Excel Discussion (Misc queries) | |||
Finding/deleting duplicates and merging cells | Excel Worksheet Functions | |||
Finding spaces cells | Excel Programming |