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: 172
Default Delete row if column A cell text length is not 11

I want to loop through the data in column A and if the text length of
the contents of the cell is not equal to 11 I want to delete the row.

Here's what I have that is not working (error is function not
compatible with object or something to that effect):

For i = Range("A:A").Rows.Count To 1 Step -1
If WorksheetFunction.Len(Range("A:A").Rows(i)) < 11 Then
Range("A:A").Rows(i).EntireRow.Delete
End If
Next i

Can someone point out what I'm doing wrong, or suggest a better
method?

Thanks




John Keith

 
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
Text to column fixed length Luci Excel Discussion (Misc queries) 6 November 27th 08 06:27 PM
Summing a column based on the length of text in a cell in anothercolumn [email protected] Excel Worksheet Functions 13 November 26th 08 05:42 PM
Code to set text length in cell Sandy Excel Programming 4 December 29th 05 02:52 PM
Search a Column by text length kb_63 Excel Worksheet Functions 2 May 6th 05 09:17 PM
The text length versus the cell size... shockley Excel Programming 2 September 14th 03 02:43 AM


All times are GMT +1. The time now is 09:03 AM.

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"