LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 234
Default .Value 9999 not recognised

I'm using code from an example posted on Ron de Bruin's web site to delete
rows where the contents of column C equals 9999. However, this isn't
working which I assume is to do with column C being numeric, I've tried all
sorts but to no avail - any pointers welcome. Thanks, Rob
..........................


'Set the first and last row to loop through
Firstrow = .UsedRange.Cells(1).Row
Lastrow = .UsedRange.Rows(.UsedRange.Rows.Count).Row

'We loop from Lastrow to Firstrow (bottom to top)
For Lrow = Lastrow To Firstrow Step -1
'We check the values in the A column in this example
With .Cells(Lrow, "A")
If Not IsError(.Value) Then
If .Value = 9999 Then .EntireRow.Delete
End If
End With
Next Lrow


 
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
add time greater than 9999:56 PapaT Excel Worksheet Functions 2 March 28th 06 03:48 AM
Find value (31.12.9999) and clear Tempy Excel Programming 3 September 13th 05 01:22 AM
Replace first part of SS# with x's (XXXX-XX-9999) Jenpher Excel Programming 6 May 6th 04 05:02 AM
Name not recognised Jerome_t Excel Programming 5 April 23rd 04 06:10 PM
VBA code only working up to 9999 rows sup191[_17_] Excel Programming 4 April 2nd 04 10:06 PM


All times are GMT +1. The time now is 04:23 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"