Create a macro
Solved/Closed
louannc
Posts
7
Registration date
Tuesday August 6, 2013
Status
Member
Last seen
August 21, 2013
-
Aug 6, 2013 at 05:01 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Aug 8, 2013 at 02:47 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Aug 8, 2013 at 02:47 AM
Related:
- Create a macro
- Create skype account with gmail - Guide
- Create snapchat account - Guide
- Create hotmail account - Guide
- Create instagram account on pc - Guide
- Create samsung account - Guide
3 responses
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Aug 7, 2013 at 04:26 AM
Aug 7, 2013 at 04:26 AM
why macro?
see
http://speedy.sh/c3PRs/louannc.docx
if macro is reqd click record macro
follow lsteps
and stop recording
see the recorded macro and edit it if necessary
see
http://speedy.sh/c3PRs/louannc.docx
if macro is reqd click record macro
follow lsteps
and stop recording
see the recorded macro and edit it if necessary
louannc
Posts
7
Registration date
Tuesday August 6, 2013
Status
Member
Last seen
August 21, 2013
Aug 7, 2013 at 09:18 AM
Aug 7, 2013 at 09:18 AM
Thank you for your input; however, a pivot table will not work for my needs. I simplified the spreadsheet, but there are over 25 columns on the spreadsheet, and I have to run a monthly report with all this info, and I need it to total the amounts for each #, Name in a separate column as I described on the spreadsheet. I was hoping that a I could run a macro each month that would auto total these for me. Is it possible? I would be grateful for any help anyone can give.
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Aug 8, 2013 at 02:47 AM
Aug 8, 2013 at 02:47 AM
data is like this
number Name Amount Total
234 Brown, j 15
234 Brown, J 30
123 Junior, C 34
123 Junior, C 30
try this macro
number Name Amount Total
234 Brown, j 15
234 Brown, J 30
123 Junior, C 34
123 Junior, C 30
try this macro
Sub test() Dim r1 As Range, c1 As Range, r As Range, filt As Range, filt1 As Range Dim cfilt As Range, ssum As Double, j As Integer Worksheets("sheet1").Activate Range("E1").EntireColumn.Delete Set r1 = Range(Range("A1"), Range("A1").End(xlDown)) Set r = Range("A1").CurrentRegion r.Sort Key1:=Range("B1"), Header:=xlYes Set filt = Range("A1").End(xlDown).Offset(5, 0) r1.AdvancedFilter xlFilterCopy, , filt, True Set filt = Range(filt.Offset(1, 0), filt.End(xlDown)) For Each cfilt In filt r.AutoFilter field:=1, Criteria1:=cfilt ssum = WorksheetFunction.Sum(r.Columns("D:D").SpecialCells(xlCellTypeVisible)) j = Range("d1").End(xlDown).Row Cells(j, "E") = ssum ssum = 0 Next cfilt ActiveSheet.AutoFilterMode = False Range(Range("A1").End(xlDown).Offset(1, 0), Cells(Rows.Count, "A")).EntireRow.Delete End Sub