Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
deleting rows from Excel with Macro
Name: sunilmulay Date: October 5, 2008 at 19:42:06 Pacific OS: Windows Vista CPU/Ram: dv6000 Product: HP Pavillion dv6000
Comment:
I'm a VBA newbie. I want to set a macro to delete rows. There are two conditions. If the user selects a row where there is data in column D in the row containing the active cell, then the macro should delete the row as well as the 5 following rows. If the user selects a row where there is no data in column D, then only that row should be deleted.
Name: Razor2.3 Date: October 6, 2008 at 04:33:13 Pacific
Reply:
Sub something() If Intersect(ActiveCell.EntireRow, ActiveSheet.Columns("$D")).Value <> "" Then For i = 1 To 5 ActiveCell.EntireRow.Delete Next 'i Else ActiveCell.EntireRow.Delete End If End Sub
0
Response Number 2
Name: sunilmulay Date: October 6, 2008 at 05:02:47 Pacific
Summary: Hi all, I am using gridview of ASP.Net 2.0. I filled up the grid using a dataset, which is disconnected from the database. I use another button outside the gridview to delete the selected row. How do ...
Summary: Hello Guys! I have a excel worksheet containg 2 colums and couple of hundred rows. For examle: 8:45 384 9:30 384 12:40 384 17:05 384 7:35 566 10:30 566 11:39 566 16:05 566 17.10 566 How can I leave on...
Summary: I am in need of assistance of an excel vba macro that i am creating. I am calculating the Canadian dollar by multipling cell "F2" * "G2". However, I am using a loop to do this and I am having troub...