![]() |
|
|
#1
|
|||
|
|||
|
Code:
Sub Remove_NoStock()
Dim i As Long
Application.ScreenUpdating = False
For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
If Cells(i, 3) = "D" And _
Application.WorksheetFunction.SumIf(Range("A:A"), Cells(i, 1), Range("G:G")) = 0 Then
Cells(i, 1).EntireRow.Delete
End If
Next
Application.ScreenUpdating = True
End Sub
Available column for ALL sizes these records do not need to be returned. Suggestions? Thanks in advance. |
|
#2
|
||||
|
||||
|
How about just describing in English what records need to be deleted and maybe those of us not fluent in SpreadSheet will understand.
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07 If your issue is resolved...follow this link for directions on how to use the Solved thread tool! Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus" |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Macro To Import CSV to ACCESS | csvivek | Import/Export Data | 1 | 12-07-2009 10:49 AM |
| How do I call an Excel macro from Access 2003 | KramerJ | Access | 0 | 05-07-2009 12:32 PM |
| Can anyone help me convert this union query into something that will work in access? | gbackus | Queries | 0 | 12-28-2008 10:56 AM |
| Convert string to date | ~SwAmPdOnKeY~ | Queries | 4 | 09-11-2008 05:19 PM |
| macro help needed: how to set the criteria of a query | neodeath | Access | 0 | 01-01-2007 11:26 AM |