LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Very small macro/VBA stuff, deleting rows.

What I want to do is delete the row that has the same value in
specific collumn (collumn 7 or G) as the row before it. Continue doin
this till the values are different. I have no experience whatsoever i
VBA or macros, but have programmed in C and Java before. This is th
code I already came up with on my own;


Code
-------------------

Sub DeleteDoubles()
Worksheets("sheet1").Activate
Dim i
For i = 0 To ActiveSheet.Rows.Count
While (ActiveSheet.Cells(i, 7).Value = ActiveSheet.Cells(i + 1, 7).Value)
Range(Cells(i + 1, 1), Cells(i + 1, 15)).Delete (xlShiftUp)
Wend
Next i
End Sub

-------------------


I still get a compile error in the definition of the while loop, erro
1004 application defined or object defined error. It also won't compil
past the For part if I put Dim i As Integer, which seems strange. Wha
is still wrong with it

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

 
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
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Links and Linking in Excel 1 November 13th 08 08:44 AM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Setting up and Configuration of Excel 1 November 12th 08 06:05 PM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Excel Worksheet Functions 1 November 12th 08 01:39 PM
Deleting rows with macro PhilScratchingmyhead Excel Worksheet Functions 2 June 29th 06 05:55 PM
deleting rows macro fullymooned[_5_] Excel Programming 2 June 16th 04 10:27 PM


All times are GMT +1. The time now is 03:51 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"