LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 414
Default Cleaning up cells

I am receiving data from a foriegn source. Sometimes there are "spaces" in
front of the data and I want to clean them up. I say "spaces" because the
trim function doesn't clean them up and when I write:
LEFT(A3) = " "
it comes back false.

The only way I have to clean these up is to write this code for each column:
Sheets("SummaryForAccess").Cells(rowNum, colNum).Value = "'" &
Right(Sheets("SummaryForAccess").Cells(rowNum, colNum).Value ,
Len(Sheets("SummaryForAccess").Cells(rowNum, colNum).Value ) - 1)

But the columns with bad data change often. So, I was wondering if there is
a different way to check for this kind of data and/or clean it.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cleaning Up John Bundy Excel Programming 0 January 2nd 07 01:39 PM
Cleaning Up Bob Phillips Excel Programming 0 January 2nd 07 01:37 PM
Cleaning Up Data [email protected] Excel Discussion (Misc queries) 3 September 20th 06 04:40 PM
Spreadsheet cleaning Richard Excel Discussion (Misc queries) 3 December 13th 05 03:06 PM
Cleaning up some VB Ton Taetsch Excel Programming 1 November 16th 04 12:53 AM


All times are GMT +1. The time now is 12:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"