Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert Row when zero or Positive value
Hi,
I have sorted a collumn in ascending value from negative to positive, I want to insert a row when the change in the value is zero or greater. i.e -2 -1 0 1 Becomes -2 -1 0 1 The Collumn changes in length and sometimes there maybe no negative numbers and sometimes there may be no positve numbers Can sombody Please help me Thanks in advance Darren -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200603/1 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert Row when zero or Positive value
assume column 3 (C)
Sub AddRow() Dim col as Long, i as long Dim lastrow as Long col = 3 lastrow=cells(rows.count,col).End(xlup).row for i = lastrow to 2 step -1 if cells(i-1,col) < 0 then rows(i).Insert exit sub end if Next End Sub -- Regards, Tom Ogilvy "FIRSTROUNDKO via OfficeKB.com" <u15639@uwe wrote in message news:5d69e9a1d65c3@uwe... Hi, I have sorted a collumn in ascending value from negative to positive, I want to insert a row when the change in the value is zero or greater. i.e -2 -1 0 1 Becomes -2 -1 0 1 The Collumn changes in length and sometimes there maybe no negative numbers and sometimes there may be no positve numbers Can sombody Please help me Thanks in advance Darren -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200603/1 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert Row when zero or Positive value
sorry if u get u reply me back..
FIRSTROUNDKO via OfficeKB.com wrote: Hi, I have sorted a collumn in ascending value from negative to positive, I want to insert a row when the change in the value is zero or greater. i.e -2 -1 0 1 Becomes -2 -1 0 1 The Collumn changes in length and sometimes there maybe no negative numbers and sometimes there may be no positve numbers Can sombody Please help me Thanks in advance Darren -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200603/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Subtracting positive amts from negative and positive from positive | Excel Worksheet Functions | |||
Sum only positive | Excel Worksheet Functions | |||
FIND POSITIVE VALUE | Excel Discussion (Misc queries) | |||
Formula to make Negative Values Positive & Positive Values Negative? | Excel Discussion (Misc queries) | |||
positive integer? | Excel Discussion (Misc queries) |