Forum Home
Press F1
 
Thread ID: 2471 1999-09-02 17:18:00 excel visual basic macro Guest (0) Press F1
Post ID Timestamp Content User
2867 1999-09-02 17:18:00 I am trying to automate the following operation on a spreadsheet in excel:
Information is in rows. I am trying to remove multiple entries based on one column-D.
i reckon the english interpretation is:
1) completely select the first row in the sheet
2) If cell D2 equals D1 and cell D2 equals D3 then delete row 5
3) Else check the next row (based on D3 and so on).
In code terms, it could look something like:
If D(n) = D(n-1) And D(n) = D(n+1) Then delete Rows('n:n').Select
Selection.Delete Shift:=x1up
Else
n=n+1
end

Hopefully you can understand my jibberish, and if you cannot help, could you suggets another source of help.
Thanks

Tom Loi
Guest (0)
1