Home

Need help with VBA

jim_vbanoob
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?

 

Thanks,

Jim

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
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Edge insider Dev bypasses IE mode website list
HotCakeX in Enterprise on
4 Replies