Dear all, Wit reference to my previous mail, i have developed the small code (furnished below). However, what is the flaw in the code is that it overwrites my previous data in sheet 2. Is there any way i could make updation only for fresh data updated today in sheet1 .
Thanks in Advance. Regards, C.G.Kumar AMW-2 Code: Sub Macro3() ' ' Macro3 Macro ' ' Range("A2").Select Range(Selection, Selection.End(xlToRight)).Select Range(Selection, Selection.End(xlDown)).Select Selection.AutoFilter Range("J2").Select ActiveSheet.Range("$A$2:$L$2927").AutoFilter Field:=10, Criteria1:="<>1", _ Operator:=xlAnd Selection.End(xlToLeft).Select Range("A2").Select Range(Selection, Selection.End(xlToRight)).Select Range(Selection, Selection.End(xlDown)).Select Range("J3").Select Selection.End(xlDown).Select Selection.End(xlUp).Select Range("A2").Select Range(Selection, Selection.End(xlToRight)).Select Range(Selection, Selection.End(xlDown)).Select Selection.SpecialCells(xlCellTypeVisible).Select Selection.Copy ActiveCell.SpecialCells(xlLastCell).Select Sheets("sheet2").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Columns("A:A").Select Range("A2").Activate Application.CutCopyMode = False Selection.Delete Shift:=xlToLeft Columns("D:D").Select Range("D2").Activate Selection.Delete Shift:=xlToLeft Selection.Delete Shift:=xlToLeft Columns("E:E").Select Range("E4").Activate Selection.Delete Shift:=xlToLeft Range("G4").Select Selection.End(xlUp).Select Sheets("sheet1").Select Range("A2").Select Range(Selection, Selection.End(xlToRight)).Select Selection.AutoFilter End Sub ---------- Forwarded message ---------- From: C.G.Kumar <kumar.bemlmum...@gmail.com> Date: Mon, Dec 6, 2010 at 10:40 AM Subject: Macro to select particular record based on criteria. To: excel-macros@googlegroups.com Dear All, I have to maintain two excel file/sheet: 1. For outstanding from Customer :It records sale by various office and collection from customer . It has 12 column (Sr.No.1 to 12) and around 3500 rows.The same is updated periodically. 2. Cheque collection File: This file contains selected record from above file i.e. Sr.No. / Col No (2,3,4,7,10,11 & 12) only if there is cheque no (Other than 1as 1 is for non collection of outstanding). I have to perform this manually which is very time consuming and prone to error. Whether it is possible to draft a macro to do so.File attached for ready reference. I am an optimist and feel there is way. Hope much experienced people could show me some light. Regards, C.G.Kumar -- Regards, C.G.Kumar -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/pages/discussexcelcom/160307843985936?v=wall&ref=ts
Outstanding.xlsx
Description: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet