How to Sum/Average by specific cells

jgaschler

New Member
Joined
Jul 8, 2015
Messages
11
Office Version
  1. 2019
Platform
  1. Windows
I am a novice in Excel and I am sure I am not using the correct nomenclature for my question. I apologize in advance for this and thank you for your time/questions in trying to help me!

Context:
I am keeping track of daily output for a produce shed that sorts and packages onions. We have hundreds of different 'Lot' numbers in total and run about 5-7 lots a day. We can use the same lot on different days.

Problem:
What I am trying to accomplish is a way to track the total bins and hours of a unique lot and the average output of each unique lot. This is notated by by the "?' in the cells of the screenshot below. What I am hoping to do is on the right side area of the Excel doc I can enter in the 'Lot' number and the following cells will calculate the data in the "?" cells from the data on the left hand side of the sheet. I manually enter in the data on the left hand side which has some basic functions in it.

EXCEL SCREENSHOT.PNG


I hope this makes sense but feel free to ask questions if I left out some crucial information.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
What version of Excel are you using? Are your daily data in tables?

But it can be accomplished with AverageIFS. If you can get the xl2bb add in and send a mini workbook folks can help you easier?
 
Upvote 0
Hi,

In order to make your life much much easier ....
1. you should get rid of all you Daily Totals
2. you should delete all empty rows
3. you should fill-in Column A with all the dates

This would create, for you, a flat database, which will allow you to perform all the possible analyses and reports you can think of ....
First example would be Inserting a Pivot Table ...

Hope this will help ;)
 
Upvote 0
@awoohaw I am using 2019 Excel and the daily data is in tables, or at least my version of a table being a novice. I'll post the minisheet from xl2bb. Thanks!

@James006 Thanks for your advice. I am not too familiar with pivot tables or tables in general so I may have set up my data incorrectly it appears.
2. If I delete the empty rows would this mess up my data? My concern is we vary on a daily basis from on how many lots we run, usually 3-5 lots a day but can range up to 7.
3. By fill-in Column A with all the dates, are you meaning all the dates that refer to 1/3/2023 should have that date in it?

I'll educate myself on Pivot Tables as this may answer my questions for me. Thank you!
 
Upvote 0
Here is my current worksheet:

Shed Packout Log for MrExcel.xlsx
ABCDEFGHIJKLMNOPQRSTUVW
1DATELOTBINSHOURSSUPERCOLOJBOMEDOTHTOT. BAGBAGS/BIN
2
31/3/2023MR12286.67349707450038210937741.13Daily Bag Output Avg.10573.33
4DA1120.4200401255065654.67
5UD1901.92097168000177719.74
6
7
8
9LOTTOTAL BINSTOTAL HOURSAVERAGE SUPERAVERAGE COLOAVERAGE JBOAVERAGE MEDAVERAGE OTHAVERAGE TOT. BAGAVERAGE BAGS/BIN
10Daily Total3309.013498046581407601181035.79
11 1/4/2023OTI281006088120142050.71MR1?????????
12MR160.67000048748781.17DA1
13JA7200.8300321198051925.95UD1
14MR12106.534266940806750576627.46OTI
15UD1521.17054100000105420.27JA7
16HT3
17UD2
18Daily Total31610.1734272360091685487924629.26
191/5/2023HT31023.1726439817953620281927.64
20DA1662.5800200915540356353.98
21UD1160.75023600036222.63
22UD21162.920312240000271223.38
23HT3441.331602087291110120827.45
24
25
26Daily Total34410.754249207293202701066431.00
JAN
Cell Formulas
RangeFormula
J19:J23,J11:J15,J3:J5J3=SUM(E3:I3)
K26,K18:K23,K10:K15,K3:K5K3=IFERROR(J3/C3,"")
O3O3=AVERAGE(J10,J18,J26)
C10:J10C10=SUM(C3:C5)
C26:J26,C18:J18C18=SUM(C11:C15)
 
Upvote 0
I am using 2019 Excel

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Avoid merged cells like the plague - there's hardly ever a reason you would need them, and they can cause all sorts of problems. I've removed the merged cells in the suggestion below. See if it gives you what you want. With reference to @awoohaw 's question - your data is in ranges, not Tables.
Book1
ABCDEFGHIJKLMNOPQRSTUV
1DATELOTBINSHOURSSUPERCOLOJBOMEDOTHTOT. BAGBAGS/BIN
2
31/03/2023MR12286.67349707450038210937741.127193Daily Bag Output Avg.10573.33
4DA1120.4200401255065654.666667
5UD1901.92097168000177719.744444
6
7
8
9LOTTOTAL BINSTOTAL HOURSAVERAGE SUPERAVERAGE COLOAVERAGE JBOAVERAGE MEDAVERAGE OTHAVERAGE TOT. BAGAVERAGE BAGS/BIN
10Daily Total3309.013498046581407601181035.787879
11 1/4/2023OTI281006088120142050.714286MR144413.84230.33458.672860.001498.67162.335210.0049.92
12MR160.67000048748781.166667DA17830.000.001205.00904.500.002109.5054.33
13JA7200.8300321198051925.95UD11583.840.0051.001013.330.000.001064.3320.88
14MR12106.534266940806750576627.457143OTI2810.000.00608.00812.000.001420.0050.71
15UD1521.17054100000105420.269231JA7200.830.000.00321.00198.000.00519.0025.95
16HT31464.5212.00303.001262.00236.500.002013.5027.55
17UD21162.920.00312.002400.000.000.002712.0023.38
18Daily Total31610.1734272360091685487924629.259494
191/05/2023HT31023.1726439817953620281927.637255
20DA1662.5800200915540356353.984848
21UD1160.75023600036222.625
22UD21162.920312240000271223.37931
23HT3441.331602087291110120827.454545
24
25
26Daily Total34410.754249207293202701066431
Sheet1
Cell Formulas
RangeFormula
J3:J5,J19:J23,J11:J15J3=SUM(E3:I3)
K3:K5,K26,K18:K23,K10:K15K3=IFERROR(J3/C3,"")
O3O3=AVERAGEIF($B:$B,"Daily Total",$J:$J)
C10:J10C10=SUM(C3:C5)
N11:O17N11=SUMIF($B:$B,$M11,C:C)
P11:V17P11=AVERAGEIF($B:$B,$M11,E:E)
C26:J26,C18:J18C18=SUM(C11:C15)
 
Upvote 0
Solution
@kevin9999 Thank you for your advice! I believe these added formulas will give me what I am looking for. Thank you all for your efforts!
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,850
Members
452,948
Latest member
UsmanAli786

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