Please help macro or formula excel
Solved/Closed
talkwutty
Posts
2
Registration date
Friday April 16, 2010
Status
Member
Last seen
April 16, 2010
-
Apr 16, 2010 at 11:58 AM
talkwutty Posts 2 Registration date Friday April 16, 2010 Status Member Last seen April 16, 2010 - Apr 16, 2010 at 07:52 PM
talkwutty Posts 2 Registration date Friday April 16, 2010 Status Member Last seen April 16, 2010 - Apr 16, 2010 at 07:52 PM
Related:
- Please help macro or formula excel
- Excel grade formula - Guide
- Number to words in excel formula - Guide
- Date formula in excel dd/mm/yyyy - Guide
- Logitech formula vibration feedback wheel driver - Download - Drivers
- Excel free download - Download - Spreadsheets
1 response
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Apr 16, 2010 at 01:34 PM
Apr 16, 2010 at 01:34 PM
Assumptions
1. Data is on Sheet1
2. Total is to be calculated on Sheet2, which exists
1. Data is on Sheet1
2. Total is to be calculated on Sheet2, which exists
Sub SummaryReport() Dim lMaxRows As Long Dim lMaxRows1 As Long lMaxRows = Cells(Rows.Count, "A").End(xlUp).Row With Range(Cells(1, "E"), Cells(lMaxRows, "E")) .FormulaR1C1 = "=RC1 & ""|"" & RC2 & ""|"" & RC3" .Copy .PasteSpecial xlPasteValues End With Sheets("Sheet2").Range("A1:A" & lMaxRows) = Range(Cells(1, "E"), Cells(lMaxRows, "E")).Value Sheets("Sheet2").Select Columns("A:A").Select Application.CutCopyMode = False Columns("A:A").Select Selection.AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("B1"), Unique:=True Columns("A:A").Delete lMaxRows1 = Cells(Rows.Count, "A").End(xlUp).Row Range("D1") = "Monthy Total" With Range(Cells(2, "D"), Cells(lMaxRows1, "D")) .FormulaR1C1 = "=SUMIF(Sheet1!C5:C5,Sheet2!RC1,Sheet1!C4:C4)" .Copy .PasteSpecial xlPasteValues End With Columns("A:A").Select Selection.TextToColumns _ Destination:=Range("A1"), _ DataType:=xlDelimited, _ TextQualifier:=xlDoubleQuote, _ ConsecutiveDelimiter:=False, _ Tab:=False, Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar:="|", _ FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1)), _ TrailingMinusNumbers:=True Sheets("Sheet1").Select Range(Cells(1, "E"), Cells(lMaxRows, "E")).Clear End Sub
Apr 16, 2010 at 07:52 PM