Sub Try()
'select cell B 10,000
ActiveSheet.Range("B10000").Select
' goes up to last drawer posted if cell is empty in B
Selection.End(xlUp).Select
Selection.End(xlUp).Select
' highlights cells below for sorting
Rows(ActiveCell.Row).Select
Range(Selection, Selection.End(xlDown)).Select
' Sorts D then B
Selection.Sort Range("D:D"), xlAscending, Range("B:B"), , xlAscending
'select cell C 10,000
ActiveSheet.Range("C10000").Select
' goes up to last drawer posted if cell is empty
Selection.End(xlUp).Offset(1, 0).Select
' Inserts new line + make bold
ActiveCell.EntireRow.Insert
ActiveCell.EntireRow.Font.Bold = True
Rows(ActiveCell.Row).Select
With Selection.Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent6
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0
End With
Cells(ActiveCell.Row, "I").Select
Cells(ActiveCell.Row, "I").AutoSum 'Has error
End Sub
1. im looking for command to autosum "i" at min.
as you can see from my code the last part i get "i" selected but can not get it to auto sum. looking for this separate so if i decided I can use the code for something else that is not date orientated.
2. is there away say it is between a certain date range. say
March - April when Macro Activated it will autosum "H" and "I",
May - June when Macro Activated it will autosum "I",
July - Dec when Macro Activated it will autosum "I" & "J":
thanks so much!
'select cell B 10,000
ActiveSheet.Range("B10000").Select
' goes up to last drawer posted if cell is empty in B
Selection.End(xlUp).Select
Selection.End(xlUp).Select
' highlights cells below for sorting
Rows(ActiveCell.Row).Select
Range(Selection, Selection.End(xlDown)).Select
' Sorts D then B
Selection.Sort Range("D:D"), xlAscending, Range("B:B"), , xlAscending
'select cell C 10,000
ActiveSheet.Range("C10000").Select
' goes up to last drawer posted if cell is empty
Selection.End(xlUp).Offset(1, 0).Select
' Inserts new line + make bold
ActiveCell.EntireRow.Insert
ActiveCell.EntireRow.Font.Bold = True
Rows(ActiveCell.Row).Select
With Selection.Interior
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent6
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0
End With
Cells(ActiveCell.Row, "I").Select
Cells(ActiveCell.Row, "I").AutoSum 'Has error
End Sub
Book1.xlsx | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
2912 | YEAGER CHARLES B | 01700245 | 9/21/2022 | P | 379 | #1 | 1,103.15 | 1,125.67 | 1,238.25 | |||
2913 | 9/21/2022 #1 | 1,125.67 | 1,238.25 | |||||||||
2914 | MENSCH DONALD A/WAGNER CONNIE A | 01700139 | 9/23/2022 | P | 82895 | 414.23 | 422.69 | 464.97 | ||||
2915 | MENSCH DONALD A/WAGNER CONNIE A | 01700140 | 9/23/2022 | P | 82896 | ADDRESS: 814 N COAL ST, SHAMOKIN, PA 17872 - SENT 3/8/2022 VAF | 396.79 | 404.90 | 445.41 | |||
2916 | 9/23/2022 | 827.59 | 910.38 | |||||||||
2917 | ZAWALICK JOHN L/ROSEMARIE | 01200730 | 9/26/2022 | P | 4080 | 43.60 | 44.50 | 48.95 | ||||
2918 | 29 N JONES LLC | 01700001 | 9/26/2022 | P | 10905 | 981.08 | 1,001.10 | 1,101.21 | ||||
2919 | 9/26/2022 | 1,045.60 | 1,150.16 | |||||||||
2920 | DEPKA CASIMIR S JR/ROBERTA | 01000093 | 9/28/2022 | P | $ | 462.20 | 471.63 | 518.80 | ||||
2921 | PORTO JUDITH D | 01000339 | 9/28/2022 | P | 6265 | 885.13 | 903.20 | 993.52 | ||||
2922 | FERRIER JAMES FRANCIS | 01100069 | 9/28/2022 | P | PG 9881590 | 588.64 | 600.66 | 660.73 | ||||
2923 | CLARK KEVIN ANTHONY | 01400059 | 9/28/2022 | P | 2873 | 566.83 | 578.41 | 636.26 | ||||
2924 | 9/28/2022 | 2,553.90 | 2,809.31 | |||||||||
2925 | REBUCK NORENE | 01100181 | 9/30/2022 | P | 1805 | 318.29 | 324.80 | 357.29 | ||||
2926 | 9/30/2022 | 324.80 | 357.29 | |||||||||
2927 | PAWELCZYK DANIEL A JR/MELINDA A | 01300502 | 10/4/2022 | P | $ | #2 | 392.43 | 400.44 | 440.49 | |||
2928 | 10/4/2022 #2 | 400.44 | 440.49 | |||||||||
2929 | SAMPSON ROSEMARIE | 01100195 | 10/7/2022 | P | MO 28073245 | 436.03 | 444.93 | 489.43 | ||||
2930 | LAHOUARI BELMAHI | 01200333 | 10/7/2022 | P | $ | 388.06 | 395.99 | 435.60 | ||||
2931 | BARSHINGER MARK (NEW OWNER: TAYLOR JOHNNIE D JR) | 01300028 | 10/7/2022 | P | MO 28222364632 | ADDRESS: 2925 SILVER HILL AVE, GWYNN OAK, MD 21207 | 164.83 | 168.18 | 185.02 | |||
2932 | DOMINICAN INNOVATIONS INC | 01300124 | 10/7/2022 | P | CASHIERS CHECK 1683704054 | 370.63 | 378.20 | 416.02 | ||||
2933 | DOMINICAN INNOVATIONS INC | 01300125 | 10/7/2022 | P | CASHIERS CHECK 1683704054 | 370.63 | 378.20 | 416.02 | ||||
2934 | DOMINICAN INNOVATIONS INC | 01400080 | 10/7/2022 | P | CASHIERS CHECK 1683704054 | 405.50 | 413.79 | 455.18 | ||||
2935 | DOMINICAN INNOVATIONS INC | 01800049 | 10/7/2022 | P | CASHIERS CHECK 1683704054 | 366.27 | 373.74 | 411.11 | ||||
2936 | DOMINICAN INNOVATIONS INC | 01800050 | 10/7/2022 | P | CASHIERS CHECK 1683704054 & 1683704055 | 353.16 | 360.39 | 396.44 | ||||
2937 | 10/7/2022 | 2,913.42 | 3,204.82 | |||||||||
SCHOOL 2022 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
I2928:J2928,I2926:J2926,I2913:J2913 | I2913 | =SUM(I2912) |
I2919:J2919,I2916:J2916 | I2916 | =SUM(I2914:I2915) |
I2924:J2924 | I2924 | =SUM(I2920:I2923) |
I2937:J2937 | I2937 | =SUM(I2929:I2936) |
1. im looking for command to autosum "i" at min.
as you can see from my code the last part i get "i" selected but can not get it to auto sum. looking for this separate so if i decided I can use the code for something else that is not date orientated.
2. is there away say it is between a certain date range. say
March - April when Macro Activated it will autosum "H" and "I",
May - June when Macro Activated it will autosum "I",
July - Dec when Macro Activated it will autosum "I" & "J":
thanks so much!