LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default where is the mistake?

I know my programming level is low and sure the mistake is a begginers
mistake...I want to insert a row if the number in row i+1 is bigger than
number than number in row i.

The code I've written is this:

Private Sub CommandButton1_Click()
Dim i As Integer
For i = 1 To 10
If Worksheets("sheet1").Range("B" & i).Value <
Worksheets("sheet1").Range("B" & i + 1).Value Then
Rows("i:i").Insert Shift:=xlDown
End If
Next
End Sub


I can't find the mistake, can you help me????

Thanks!
--
atrep
 
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
Newbee made a big mistake [email protected] Excel Discussion (Misc queries) 2 July 12th 06 08:20 AM
Circular reference mistake toddbob Excel Worksheet Functions 1 April 9th 06 12:12 AM
mistake in formula pm Excel Discussion (Misc queries) 4 January 30th 06 05:31 PM
I saved it by mistake!!!! Ellie Ellis Excel Worksheet Functions 2 November 27th 05 09:40 PM
If I get the help box up by hitting F1 by mistake, how can I get . Last1Standin Excel Discussion (Misc queries) 1 February 17th 05 08:56 PM


All times are GMT +1. The time now is 02:24 PM.

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

About Us

"It's about Microsoft Excel"