Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Reply For Ronny

ronny


Something went wrong when i was posting my latest reply to you so i a
reposting it as a new message as well as a reply to your origina
message



I am using excel 97 and do not get the same error that you are.

You may be suffering from a broken line wrap command


try this code which is your code with line wrap added in at appropriat
places. This allows a single line of code to be spread over severa
continuose lines



Dim lastrow As Long
Dim row_index As Long

lastrow = ActiveSheet.Cells(Rows.Count, _
"E").End(xlUp).Row

For row_index = lastrow - 1 To 1 Step -1
If Left(Cells(row_index, "D").Value, 4) _
< Left(Cells(row_index + 1, "D").Value, 4) Then
Cells(row_index + 1, "D").Resize(2, 1). _
EntireRow.Insert (xlShiftDown)
Cells(row_index + 1, "C").FormulaR1C1 _
= "=SUMPRODUCT(--(LEFT(R1C4:R[-1]C4,4)" _
& "=LEFT(R[-1]C4,4)),R1C3:R[-1]C3)"
Cells(row_index + 1, "C").Font.ColorIndex = 3
Cells(row_index + 1, "C").Font.Bold = True
Cells(row_index + 1, "C").Font.Size = 14
Cells(row_index + 1, "C").Name = _
Left(Cells(row_index, "D").Value, 4)
End If
Nex

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
No reply Gary Excel Worksheet Functions 1 March 17th 06 05:29 PM
Reply JohnUK Excel Discussion (Misc queries) 1 February 27th 05 07:21 PM
No need to reply!! nrage21[_32_] Excel Programming 0 February 12th 04 10:22 PM
Reply to Tom Phil Perry Excel Programming 1 July 12th 03 05:56 PM
Reply to Tom phil perry Excel Programming 0 July 11th 03 09:11 PM


All times are GMT +1. The time now is 05:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"