SUMIFS help, calculate certain days revenue

dmoore702

New Member
Joined
Jun 21, 2015
Messages
18
I have a calendar setup where the columns are: Date, Day, Location A, Location B
The date is chronologial from the 1st to the end of the month, Day rotates down from M to Su, Location A & B are different amounts daily.
I can use SUMIF(C3:C33,"Su",D3:D33) and get the sum for all totals of Sundays during the month, here's where my difficulty starts.
I need to use two days, those being days off, so Su and M, or M and T, etc. I also need to repeat the formula for twelve months.
First month is columns A-D, second month G-J, third L-O etc.
Thanks in advance for the help.
 

Attachments

  • 0 Excel help.jpg
    0 Excel help.jpg
    242.8 KB · Views: 8

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
What do you mean by "I need to use two days"?
From the one column of days, I need the sum of both a Su and M or W and Th, a particular persons days off basically.
I could use two sumif formulas, one for the Sundays and one for the Mondays, but then have to repeat it for 12 months. Looking for a way to condense that formula
 
Upvote 0
are days off always consecutive? Which version of excel do you use? ( Please update your profile with your version, many suggestions you may receive may not work on older versions of excel).
 
Upvote 0
Here is a solution that has a lot of typing but just a few real calculations. It is using the reference area function of the INDEX function.
I am sure it can be done easier in later versions, and you may need to use the CSE (CNTL-SHFT-ENTR) keystrokes to commit the formula to the cell.
Also, you may need to switch the SUM function with SUMPRODUCT.

I've had to chop up the INDEX Ranges into different xl2bb minisheets:

Here is 1 of 4:

Mr excel questions 62.xlsm
ABCDEFGHIJKLMNOPQRST
1DATEDAYABDATEDAYABDATEDAYABDATEDAYAB
201-JanSun364.07342.7201-FebWed484.87532.8901-MarWed623.38292.2901-AprSat578.69307.67
302-JanMon448.25632.502-FebThu460.31323.2602-MarThu454.57570.3502-AprSun421.38478.58
403-JanTue623.42304.3603-FebFri376.88321.8703-MarFri527.52382.903-AprMon386.49343.01
504-JanWed261.22337.8604-FebSat356.66328.0804-MarSat291.56449.9404-AprTue390.27285.79
605-JanThu362.67423.5105-FebSun318.5406.3405-MarSun600.35356.2105-AprWed513.08598.11
706-JanFri438.13346.1406-FebMon649.04472.0906-MarMon598.74476.9406-AprThu343.01520.54
807-JanSat494.55307.0707-FebTue410.11571.0307-MarTue283.81493.9907-AprFri558.23606.28
908-JanSun343.28563.2908-FebWed536.78625.5408-MarWed369.49377.7808-AprSat524.31540.95
1009-JanMon275.43565.7109-FebThu400.11285.5509-MarThu608.47386.3909-AprSun410.34360.93
1110-JanTue632.8461.3210-FebFri496.19395.7710-MarFri324.25609.2210-AprMon298.57589.38
1211-JanWed542.08537.2711-FebSat354.19265.9411-MarSat338.95324.5211-AprTue416.89579.11
1312-JanThu440.66407.712-FebSun507.79476.2312-MarSun314.59380.0512-AprWed298.01521.97
1413-JanFri369.5352.1213-FebMon643.66528.6813-MarMon348.33579.1313-AprThu531.1293.14
1514-JanSat640.65269.2314-FebTue397.04399.3414-MarTue395.66339.314-AprFri384.75608.94
1615-JanSun311.11345.5515-FebWed610.88522.3115-MarWed390.13371.7715-AprSat560.22473.13
1716-JanMon565.28627.2816-FebThu388.31289.9116-MarThu575.05512.2916-AprSun554.88428.9
1817-JanTue279.92267.2117-FebFri322.6649.3717-MarFri591.92306.717-AprMon359.2298.6
1918-JanWed632.74250.1918-FebSat343.48561.6718-MarSat605.9584.1918-AprTue452.83522.76
2019-JanThu317.92534.0819-FebSun430.64362.0419-MarSun342.47584.1119-AprWed364.42473.25
2120-JanFri545.04501.0920-FebMon561.18259.2720-MarMon640.86478.2220-AprThu326.5438.94
2221-JanSat622.72278.1321-FebTue633.69406.3121-MarTue569.38492.4221-AprFri640.05264.32
2322-JanSun574.09381.7222-FebWed634.7491.8822-MarWed498.96559.5522-AprSat494.41256.32
2423-JanMon564.89466.4323-FebThu310.2449.6923-MarThu588.23466.6723-AprSun500.27370.8
2524-JanTue439.18293.7824-FebFri460.71452.8924-MarFri470.73360.2924-AprMon404.44639.85
2625-JanWed322.73561.4625-FebSat359.06351.6625-MarSat538.03329.725-AprTue634.29489.35
2726-JanThu314.24289.9126-FebSun517.64472.6326-MarSun529.79310.9526-AprWed316.85485.3
2827-JanFri495.86384.4927-FebMon561.92517.3227-MarMon532.56421.8227-AprThu291.28528.82
2928-JanSat602.98479.7328-FebTue540.64317.4628-MarTue335.05415.3228-AprFri472.8320.72
3029-JanSun450.98558.2329-MarWed514.71577.429-AprSat346.54389.54
3130-JanMon489.83500.0730-MarThu429.76514.7130-AprSun287.76367.85
3231-JanTue463.92491.9531-MarFri629.35569.07
dmoore702



Here is 2 of 4:
Mr excel questions 62.xlsm
VWXYZAAABACADAEAFAGAHAIAJAKALAMAN
1DATEDAYABDATEDAYABDATEDAYABDATEDAYAB
201-MayMon345.94336.501-JunThu523.57445.9601-JulSat416.94492.7101-AugTue500.17399.09
302-MayTue379.18482.302-JunFri596.23297.3202-JulSun391.43386.2702-AugWed497.57469.14
403-MayWed633.08413.8103-JunSat488.34433.4503-JulMon623.529003-AugThu466.56398.34
504-MayThu301.75317.4304-JunSun601.99452.0704-JulTue326.83390.104-AugFri364.45547.1
605-MayFri318.99384.905-JunMon345.9359.5205-JulWed374.66544.2405-AugSat336.47421.3
706-MaySat495.58643.2806-JunTue331.03465.5706-JulThu370.09387.1106-AugSun340.2337.52
807-MaySun633.22570.5807-JunWed261.74533.6707-JulFri264.31406.2107-AugMon348.26640.39
908-MayMon366.15457.3408-JunThu557.09306.9408-JulSat359.37619.3808-AugTue401.55272.37
1009-MayTue361.44494.0509-JunFri602.67569.6709-JulSun359.37612.609-AugWed594.68630.8
1110-MayWed544.77329.9910-JunSat432.83362.7110-JulMon265.67511.4310-AugThu290.83506.8
1211-MayThu392.71510.2511-JunSun255.08410.1911-JulTue381.89401.1611-AugFri550.24467.46
1312-MayFri339.63250.4412-JunMon570.43584.1512-JulWed575.51262.6912-AugSat436.3462.31
1413-MaySat262.03515.9613-JunTue628.25604.3513-JulThu385.62414.5213-AugSun612.9547.39
1514-MaySun332.86263.0714-JunWed392.38391.8114-JulFri621.42525.1214-AugMon520.07444.67
1615-MayMon263.8960215-JunThu427.25399.1615-JulSat339.41420.615-AugTue281.21424.11
1716-MayTue454.27639.3716-JunFri628.76414.7416-JulSun611.17542.3816-AugWed536.16579.27
1817-MayWed392.25592.717-JunSat319.52575.1917-JulMon508.3585.9817-AugThu416.46262.16
1918-MayThu402.05543.6418-JunSun541.39472.818-JulTue534.5444.3318-AugFri360.36628.58
2019-MayFri478.38357.3919-JunMon513.95497.6419-JulWed253.15587.3419-AugSat317.16311.9
2120-MaySat384.32401.3820-JunTue386.98319.7420-JulThu550.4630.9720-AugSun441.3526.6
2221-MaySun519.06584.5121-JunWed637.23597.5921-JulFri574.64345.1721-AugMon431.66489.81
2322-MayMon300.19262.2322-JunThu592.48373.5722-JulSat627.6501.9522-AugTue556.12505.81
2423-MayTue463.09634.8123-JunFri585.17536.7923-JulSun600.9397.9923-AugWed250.12338.86
2524-MayWed263.1329.3424-JunSat364.3477.224-JulMon527.04631.1324-AugThu572.32415.05
2625-MayThu299.56269.3825-JunSun493.27624.3325-JulTue462.48422.1125-AugFri349.7528.67
2726-MayFri591.84391.4926-JunMon337.08466.5326-JulWed493.39360.3126-AugSat347.42416.09
2827-MaySat641.03348.9927-JunTue616.79351.8527-JulThu322.39355.927-AugSun514.86288.26
2928-MaySun641.14308.7928-JunWed458.87250.1928-JulFri462.14528.3528-AugMon479.9340.61
3029-MayMon404.46426.8629-JunThu458.89481.7429-JulSat257.36346.929-AugTue478.78444.34
3130-MayTue291.74336.6430-JunFri266.89597.9830-JulSun418.7535.1330-AugWed542.57548.12
3231-MayWed550.77252.5331-JulMon554.1610.0731-AugThu598.96456.53
dmoore702



Here is 3 of 4:
Mr excel questions 62.xlsm
APAQARASATAUAVAWAXAYAZBABBBCBDBEBFBGBH
1DATEDAYABDATEDAYABDATEDAYABDATEDAYAB
201-SepFri387.08437.0601-OctSun259.28289.0801-NovWed465.55409.5401-DecFri256.97487
302-SepSat514.8466.1402-OctMon267.08543.3502-NovThu609.32518.5702-DecSat286.07526.42
403-SepSun268.62355.603-OctTue335.04451.1103-NovFri402.1325.8803-DecSun250.7503.91
504-SepMon604.81377.3504-OctWed470.43422.4604-NovSat310.03376.0804-DecMon611.81620.08
605-SepTue377.22637.5905-OctThu557.56419.3905-NovSun409.98374.6605-DecTue448.49267.35
706-SepWed539.45550.5906-OctFri370.67389.0706-NovMon317.73314.7306-DecWed254.43633.16
807-SepThu609.02477.9407-OctSat386.59476.7707-NovTue511.91362.4907-DecThu521.72634.95
908-SepFri341270.6208-OctSun301.04478.4108-NovWed492.7603.7108-DecFri530.95322.69
1009-SepSat647.3332.4609-OctMon284.76264.5609-NovThu467.92356.6509-DecSat336.67543.51
1110-SepSun641.44495.2610-OctTue559.25526.7710-NovFri535.73568.2610-DecSun498.55644.12
1211-SepMon298.57458.1611-OctWed336.13273.6811-NovSat386.41475.5911-DecMon309.52336.03
1312-SepTue408.99458.0512-OctThu537.79270.1212-NovSun343.03424.6412-DecTue535.92575.72
1413-SepWed492.95396.3413-OctFri270.58296.6413-NovMon555.81272.8713-DecWed496.63625.23
1514-SepThu493.59548.4214-OctSat514.42404.9614-NovTue550.17462.0814-DecThu625.52437.43
1615-SepFri589.77517.3615-OctSun503.33377.8515-NovWed290.75413.8615-DecFri397.19340.36
1716-SepSat362.3526.816-OctMon462.12362.6416-NovThu556.64376.6216-DecSat567.81441.86
1817-SepSun586.01401.0617-OctTue452.59528.4517-NovFri517.97590.2717-DecSun448.58342.4
1918-SepMon485.25301.6618-OctWed508.69294.1218-NovSat370.7528.4818-DecMon258.42608.36
2019-SepTue385.97507.319-OctThu620.41501.4419-NovSun443.08507.219-DecTue344.53360.06
2120-SepWed287.3337.9520-OctFri558.87641.4920-NovMon437.11491.3320-DecWed476.74634.22
2221-SepThu612.84586.0821-OctSat473.78399.8621-NovTue592.39354.8721-DecThu558.24410.5
2322-SepFri259.69496.2522-OctSun411.83641.8222-NovWed294.97285.0322-DecFri477.79347.33
2423-SepSat353.38586.0823-OctMon583.35258.7423-NovThu338.63611.8823-DecSat268.04347.26
2524-SepSun617.46310.6724-OctTue581.08501.4624-NovFri463.58317.5824-DecSun461.1273.46
2625-SepMon256.85514.4525-OctWed527.65559.7725-NovSat627.12564.725-DecMon272.28359.73
2726-SepTue568.11432.7826-OctThu274.74444.0726-NovSun458.83492.8926-DecTue269.95377.54
2827-SepWed460.32575.3427-OctFri422.34490.6827-NovMon469.72606.3127-DecWed283.4543.65
2928-SepThu475.51396.328-OctSat404.65635.128-NovTue521.1627128-DecThu526.77297.74
3029-SepFri369.69614.0529-OctSun646.65485.229-NovWed493.21616.1929-DecFri562.71326.27
3130-SepSat468.43324.330-OctMon365.95500.8730-NovThu529.66440.9930-DecSat533.7580.76
3231-OctTue275.31456.831-DecSun491.36313.3
dmoore702


and 4 of 4, with the calculation:

Mr excel questions 62.xlsm
ABCDEF
34
35
36EmployeeMonthDay 1 OffDay 2 OffSum Days Off in the Month
37NameJanWedThu6536.24
dmoore702
Cell Formulas
RangeFormula
E37E37=SUM( (--(WEEKDAY(INDEX(($B$2:$E$32,$G$2:$J$29,$L$2:$O$32,$Q$2:$T$31,$V$2:$Y$32,$AA$2:$AD$31,$AF$2:$AI$32,$AK$2:$AN$32,$AP$2:$AS$31,$AU$2:$AX$32,$AZ$2:$BC$31,$BE$2:$BH$32),0,1, MATCH(B37,{"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov,""Dec"},0)),2)=MATCH(C37:D37,{"Mon","Tue","Wed","Thu","Fri","Sat","Sun"},0)) * INDEX(($B$2:$E$32,$G$2:$J$29,$L$2:$O$32,$Q$2:$T$31,$V$2:$Y$32,$AA$2:$AD$31,$AF$2:$AI$32,$AK$2:$AN$32,$AP$2:$AS$31,$AU$2:$AX$32,$AZ$2:$BC$31,$BE$2:$BH$32),0,3, MATCH(B37,{"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov,""Dec"},0))) + (--(WEEKDAY(INDEX(($B$2:$E$32,$G$2:$J$29,$L$2:$O$32,$Q$2:$T$31,$V$2:$Y$32,$AA$2:$AD$31,$AF$2:$AI$32,$AK$2:$AN$32,$AP$2:$AS$31,$AU$2:$AX$32,$AZ$2:$BC$31,$BE$2:$BH$32),0,1, MATCH(B37,{"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov,""Dec"},0)),2)=MATCH(C37:D37,{"Mon","Tue","Wed","Thu","Fri","Sat","Sun"},0)) * INDEX(($B$2:$E$32,$G$2:$J$29,$L$2:$O$32,$Q$2:$T$31,$V$2:$Y$32,$AA$2:$AD$31,$AF$2:$AI$32,$AK$2:$AN$32,$AP$2:$AS$31,$AU$2:$AX$32,$AZ$2:$BC$31,$BE$2:$BH$32),0,4, MATCH(B37,{"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov,""Dec"},0))) )
 
Upvote 0

Forum statistics

Threads
1,215,140
Messages
6,123,267
Members
449,093
Latest member
Vincent Khandagale

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top