Paleo
12-21-2005, 11:30 AM
Hi guys,
I have a list of dates, but some out of them are not being shown, so I need to make room for that date.
I am using the following code:
Dim j As Long, k As Date
k = Range("B" & Rows.Count).End(xlUp).Value
For j = Range("B" & Rows.Count).End(xlUp).Row To 1 Step -1
If Range("B" & j - 1).Value < k And Range("B" & j).Value > k Then
With Range("B" & j)
.Select
.EntireRow.Insert
.Value = Range("B" & j + 1).Value - 1
End With
k = k - 1
End If
Next
:banghead: :banghead: :banghead: :banghead:
What do I want? Ok, I want it to add a row when the currente row is 1/5/2005 and the row after that is 1/3/2005 and then it need to write 1/4/2005 to the newly created row. Was I clear?
Any clues? :dunno :dunno
I have a list of dates, but some out of them are not being shown, so I need to make room for that date.
I am using the following code:
Dim j As Long, k As Date
k = Range("B" & Rows.Count).End(xlUp).Value
For j = Range("B" & Rows.Count).End(xlUp).Row To 1 Step -1
If Range("B" & j - 1).Value < k And Range("B" & j).Value > k Then
With Range("B" & j)
.Select
.EntireRow.Insert
.Value = Range("B" & j + 1).Value - 1
End With
k = k - 1
End If
Next
:banghead: :banghead: :banghead: :banghead:
What do I want? Ok, I want it to add a row when the currente row is 1/5/2005 and the row after that is 1/3/2005 and then it need to write 1/4/2005 to the newly created row. Was I clear?
Any clues? :dunno :dunno