Need help with VBA

New Contributor

Hi All!

My name is Jim and I'm new to this online community seeking help on VBA and possibly helping others on Excel related issues. 

I'm currently working on a VBA code that let's me delete an entire row when the revenue is within 1000 to -1000. (revenue is on column C). I tried to write the code myself but it doesn't seem to work. Can someone please point me to the right direction to where I'm wrong please?




my code is as follow:


Dim k As Long
For k = Range("C" & Rows.Count).End(xlUp).Row To 1 Step -1
If Not (Range("C" & k).Value < -1000 And Range("C" & k).Value < 1000) Then
Range("C" & k).EntireRow.Delete
End If
Next k 


1 Reply
Hi all, sorry this has been resolved... my code is correct... sorry and thank you all!
Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies