Find negative value & Clear

T

Tempy

Hi all, i have some negative values (-123) in column "T" and i need to
clear these minus values only. I have a spreadsheet that can be upto
2000 rows or longer with other values in "T" also.
Could you please help with some code.

thanks in advance.

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
 
J

Jim Thomlinson

Sub ClearNegatives()
Dim rngToSearch As Range
Dim rngCurrent As Range
Dim wks As Worksheet

Set wks = ActiveSheet
Set rngToSearch = Range(wks.Range("T2"), _
wks.Cells(Rows.Count, "T").End(xlUp))
For Each rngCurrent In rngToSearch
If rngCurrent.Value < 0 Then _
rngCurrent.Value = ""
Next rngCurrent
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top