Hi All, Thank you all for your response.
Special thanks to Noorain Ansari, who provided me what I wanted. Regards, Raghavendra On Jul 22, 8:22 am, NOORAIN ANSARI <noorain.ans...@gmail.com> wrote: > Dear Raghvendra, > > Please try below code and see attached sheet.... > > Sub advancefilter_sumif() > Dim i, j As Long > Dim abc, cba As Range > Application.ScreenUpdating = False > Sheet1.Range("A1:A" & Sheet1.Range("A1").End(xlDown).Row).Copy > Sheet1.Range("D1").Select > ActiveSheet.Paste > Sheet1.Range("E1").Value = "Amount" > Sheet1.Range("D1:D" & Sheet1.Range("A1").End(xlDown).Row).RemoveDuplicates > 1, xlNo > j = Application.WorksheetFunction.CountA(Sheet1.Range("D:D")) > Set abc = Sheet1.Range("A1:A" & Sheet1.Range("A1").End(xlDown).Row) > Set cba = Sheet1.Range("B1:B" & Sheet1.Range("B1").End(xlDown).Row) > For i = 2 To j > Sheet1.Range("E" & i).Value = Application.WorksheetFunction.SumIf(abc, > Sheet1.Range("D" & i).Value, cba) > Next > Application.ScreenUpdating = True > end sub > -- > Thanks & regards, > Noorain Ansari > *http://noorain-ansari.blogspot.com/*<http://noorain-ansari.blogspot.com/> > > On Fri, Jul 22, 2011 at 12:24 AM, GoldenLance <samde...@gmail.com> wrote: > > A Pivot Table is used precisely for such computations. As a thumb > > rule, use Excel functions and tools where Excel can handle it > > efficiently. Use VBA only if Excel cannot give desired output on its > > own > > > On Jul 21, 10:19 pm, Raghavendra <raghavendra....@gmail.com> wrote: > > > Hi, > > > > Can anyone let me know VBA code for the below? > > > > Input Data > > > > Names Amount > > > A 100 > > > B 200 > > > C 100 > > > B 100 > > > A 100 > > > D 150 > > > > Out put data should be > > > > Names Amount > > > A 200 > > > B 300 > > > C 100 > > > D 150 > > > > Regards, > > > Raghavendra > > > -- > > > ---------------------------------------------------------------------------------- > > 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 athttp://www.excel-macros.blogspot.com > > 4. Learn VBA Macros athttp://www.quickvba.blogspot.com > > 5. Excel Tips and Tricks athttp://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/discussexcel > > > > advance Filter + Sumif_Example.xlsm > 25KViewDownload -- ---------------------------------------------------------------------------------- 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/discussexcel