View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
vernerv[_6_] vernerv[_6_] is offline
external usenet poster
 
Posts: 1
Default "Insert Line Break-Macro"

Hey Tom,

Thanks for the macro

I know I'm pushing my luck, but is there anyway I can enter
value(-111) inside the blank cells of the first 4 columns once the
have been created using this macro?

Macro:

Sub InsertBlanks()
Dim i As Long
For i = Cells(Rows.Count, "A").End(xlUp).Row To 2 Step -1
If Cells(i, "A").Value < Cells(i - 1, "A").Value Then
Cells(i, "A").EntireRow.Insert
i = i - 1 ' skip new line
End If
Next i
End Sub

I have changed the column"A" to "C" as I need that to check for th
incremental number within that column and introduce the blank row. No
in the 4 columns I would require the value -111 to be introduced usin
the same macro.

This is my actual requirment:
25.345085 51.367877 1 0
25.784345 50.356682 1 0
-111 -111 -111 -111
66.179288 47.117222 2 0
66.164537 47.128142 2 0
-111 -111 -111 -111


Any suggestions?

Thanks a lot!
Verne

--
Message posted from http://www.ExcelForum.com