Tech Support Guy banner
Status
Not open for further replies.

Simple problem - copy sheet then delete duplicate rows

1K views 1 reply 2 participants last post by  bomb #21 
#1 ·
Simple problem - copy sheet then delete duplicate rows

I have a worksheet that is composed a header row, and columns of data (client call results).
Each client is identified by a unique ID number in column A, a seperate column F has the 'call number, from 1 to x'.
So a client can have a single or multiple rows of data. Each client group of rows is sequenced with call 1 as line 1, call 2 at line 2, etc. etc. as your proceed down the rows.
The entire worksheet is already sorted (with a header row) ascending by client id and call #

What I want to accomplish is this

1 - copy the existing worksheet (CallRecords) to a new worksheet (CallToday)
2 - in the new worksheet, scan down (or up) from first data row (2) to the last row {ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row} and
delete duplicate rows of the Client ID retaining the row with the max call number for that client id.
3 - sort the new worksheet (CallToday) ascending by column (G) date, and column (H) time.

Thanks for your help. I am a newbie to VBA.
 
See less See more
#2 ·
stewartrr said:
I am a newbie to VBA.
Not a problem, since you don't need it for this ; a combination of built-in functions will do.

It's not clear if you have blanks in col A -- if you do, that can be easily fixed.

See the attached. The list of ID #s in col A of Sheet2 was extracted from Sheet1 using Advanced Filter (unique records only). The formulas in col B of Sheet2 pull in the value from col B of Sheet1 (per the last row for each ID #).

Post back if you need help interpreting the formulas. :)
 

Attachments

Status
Not open for further replies.
You have insufficient privileges to reply here.
Top