Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
i have a spreadsheet on jobs estimated. i have columns a to g to input data into. in columns h ai i have formulas for this data. i have formulas in 2000 rows (and i need this many rows). in column g, if the job has been closed, we put an "x" in that column. i would like to delete this row automatically without filtering and deleting it manualy. i only need to delete a to g in this row and leave h through ai (because these have formulas in them). can you please help me. i believe there is a way to use vba but i'm not really all that familar with it. please help somebody asap!!!!
thanks and GOD bless, mark lane |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Mark,
please try this and see if this works Sub PartDelete() Range("G1").Select For I = 1 To 2000 If ActiveCell.Value = "x" Then ActiveCell.Offset(0, -6).Select Range(Selection, Selection.End(xlToRight)).Clear ActiveCell.Offset(0, 6).Select Else ActiveCell.Offset(1, 0).Select End If Next I End Sub Try out this. |
#3
![]() |
|||
|
|||
![]() Quote:
thanks Samuel, i will try this at work tomorrow. i appreciate your help. i have another question. how do i get this to run as soon as the worksheet is opened and keep running until it's closed? please help. thanks and GOD bless, Mark Lane Last edited by mark lane : September 14th 06 at 01:15 AM |
#4
![]() |
|||
|
|||
![]() Quote:
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Suming selected cells based on two criteria | Excel Worksheet Functions | |||
sum items in a column based on criteria located in other columns | Excel Discussion (Misc queries) | |||
Importing data from one worksheet to another based upon part numbe | Excel Discussion (Misc queries) | |||
Returning Results Based on Two Criteria | Excel Worksheet Functions | |||
counting cells (COUNTIF) based on two or more criteria | Excel Worksheet Functions |