Hello,
I tried searching but I didn't see anything. I'm trying to scan a range of data, locate the maximum date, and return only 1 unique account record on another worksheet tab. See attached. I would like a button I can click to do this.
Thanks,
VB
Last edited by virtualnoob; 01-26-2012 at 07:13 PM. Reason: noob
Please see attached for the solution![]()
To thank someone who has helped you, click on the star icon below their name.
I hate reading
Portfolio
I need a job.I am young and incompetent
Here's the file.
if anyone can help and teach me how to do this, ill paypal you $
edit: and sorry, the final output on the second tab should have B12 instead of the **** purchase
Last edited by virtualnoob; 01-26-2012 at 08:21 PM.
Now where is my money?
Sub Test() Dim WS As Worksheet: Set WS = Worksheets("Original") Dim Col As Long, LR As Long Dim i As Long, j As Long With Application .ScreenUpdating = False .StatusBar = "Updating" End With With WS LR = .UsedRange.Rows.Count .Range(.Cells(1, 1), .Cells(LR, 3)).AdvancedFilter Action:=xlFilterCopy, _ CopyToRange:=.Cells(1, 7), unique:=True For i = 2 To .Cells(Rows.Count, "I").Row For j = 2 To LR If .Cells(i, "G") & .Cells(i, "H") & .Cells(i, "I") = .Cells(j, "A") & .Cells(j, "B") & .Cells(j, "C") Then If .Cells(i, "J") < .Cells(j, "D") Then .Cells(i, "J") = .Cells(j, "D") .Cells(i, "K") = .Cells(j, "E") End If End If Next j Next i End With With Application .ScreenUpdating = True .StatusBar = "" End With End Sub
To thank someone who has helped you, click on the star icon below their name.
I hate reading
Portfolio
I need a job.I am young and incompetent
Sweet. Thank you! Okay let me check it at work tomorrow - I'll let you know how it goes.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks