Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Go all the way along a row and then delete...
HI there, I need Excel to go from c1 all the way to the end of the row (ie until there is no more data in row 1), then go one more cell to the right (ie now in a blank cell), then go down to the last bit of info in that column, then delete from that point all along the row (ie going to the right :), ie higher column refs ) until it runs out of data. Thanks - appreciate some help - (Im struggling with where to put the offsets.... Regards D *** Sent via Developersdex http://www.developersdex.com *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Go all the way along a row and then delete...
Sub DeleteData()
Dim iCol As Long Dim iRow As Long Dim StartRow As Long StartRow = 10 'adjust startrow to suit iCol = Cells(StartRow, Columns.Count).End(xlToLeft).Column iRow = Cells(Rows.Count, iCol).End(xlUp).Row Range(Cells(iRow, iCol), Cells(iRow, iCol).End(xlToRight)).ClearContents End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Darin Kramer" wrote in message ... HI there, I need Excel to go from c1 all the way to the end of the row (ie until there is no more data in row 1), then go one more cell to the right (ie now in a blank cell), then go down to the last bit of info in that column, then delete from that point all along the row (ie going to the right :), ie higher column refs ) until it runs out of data. Thanks - appreciate some help - (Im struggling with where to put the offsets.... Regards D *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming | |||
Delete every 3rd row, then delete rows 2-7, move info f/every 2nd row up one to the end and delete the row below | Excel Programming |