Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 *** |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 -- HTH... Jim Thomlinson "Tempy" wrote: 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 *** |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Jim, really appreciate the help.
Tempy *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
negative numbers in parenthesis are not clear on excel printout? | Excel Discussion (Misc queries) | |||
Find value (31.12.9999) and clear | Excel Programming | |||
CLEAR FIND BUFFER UPON CLOSING | Excel Worksheet Functions | |||
find a cell, jump to next roll and clear all cells | Excel Programming | |||
find a cell, jump to next roll and clear all cells | Excel Programming |