![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 1
|
Prob 1:
I am getting a spreadsheet daily and by day 5 I have to make sure that all data from day 1 has been completed and no longer shows on the daily report. Prob 2: on a spreadsheet i have the date,address and device number. I only want one record of the device number. I have tried the unique values option but im still getting double ups because of the dates. Your help would be much appreciated |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
Quote:
Q2: Advanced Filter should have worked for you. Another option is to sort your data on the device number column and then delete the duplicates. Here is a macro which should do the job, assuming dates in A, address in B, device number in C '---begin VBA--- Sub test() Dim lastrow As Long, x As Long Application.ScreenUpdating = False With ActiveSheet .UsedRange lastrow = .Cells.SpecialCells(xlCellTypeLastCell).Row .Range("C1").Sort Key1:=Range("C1"), Order1:=xlAscending, Header:=xlYes For x = lastrow - 1 To 2 Step -1 If .Cells(x, 3) = .Cells(x + 1, 3) Then .Rows(x + 1).Delete Next x End With End Sub '---end VBA--- Bye, Jay |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|