Lawrence Dodge
Member
Hi all --
I work at a plant that bottles milk and juice. Every day I have to generate a very time consuming report from all of the previous day's work. This report is generated from a DB we utilize and has 400+ rows from weight samples taken through out the day.
The question I have is two fold.
1. How can I put a blank row between the various products made (this is NOT a fixed amount of rows and changes per product and per day).
2. How can I average the weight differences for one product (this would be everything under a blank row to the next blank row.
So below is a small example.
I would like to automatically insert a row after the last "1 Gallon Homo" and another blank after the last "1 Gallon Skim", then go to column I and have an average for all the weight differences in that section
(column G is the measured weight in grams and row H is the target weight in grams -- column I is H - G and columns B -- F are not needed for this report)
If you use VBA to figure this out, please include detailed instructions as I have very little experience with VBA.
thank you much
Lawrence
1 Gallon HomoFiller 6ROGER10/6/201513:10:15D39833974-9
1 Gallon HomoFiller 6ROGER10/6/201513:10:15A3979.53974-5.5
1 Gallon HomoFiller 6ROGER10/6/201513:10:15O3970.539743.5
1 Gallon HomoFiller 6ROGER10/6/201513:10:15C3974.53974-0.5
1 Gallon HomoFiller 6ROGER10/6/201513:10:15P39773974-3
1 Gallon HomoFiller 6ROGER10/6/201513:10:15M3973.539740.5
1 Gallon SkimFiller 6ROGER10/6/201511:03:11B39923985-7
1 Gallon SkimFiller 6ROGER10/6/201511:03:11C39893985-4
1 Gallon SkimFiller 6ROGER10/6/201511:03:11G3983.539851.5
1 Gallon SkimFiller 6ROGER10/6/201511:03:11C3986.53985-1.5
1 Gallon SkimFiller 6ROGER10/6/201511:03:11E3978.539856.5
1 Gallon SkimFiller 6ROGER10/6/201511:03:11H39953985-10
1 Gallon 1 %Filler 6ROGER10/6/201512:30:50I3960.5398221.5
1 Gallon 1 %Filler 6ROGER10/6/201512:30:50A3963.5398218.5
1 Gallon 1 %Filler 6ROGER10/6/201512:30:50L3969398213
1 Gallon 1 %Filler 6ROGER10/6/201512:30:50E3964398218
1 Gallon 1 %Filler 6ROGER10/6/201512:30:50B3961.5398220.5
1 Gallon 1 %Filler 6ROGER10/6/201512:30:50K3980.539821.5
1 Gallon 1 %Filler 6ROGER10/6/201512:01:09F3970398212
1 Gallon 1 %Filler 6ROGER10/6/201512:01:09C3972398210
I work at a plant that bottles milk and juice. Every day I have to generate a very time consuming report from all of the previous day's work. This report is generated from a DB we utilize and has 400+ rows from weight samples taken through out the day.
The question I have is two fold.
1. How can I put a blank row between the various products made (this is NOT a fixed amount of rows and changes per product and per day).
2. How can I average the weight differences for one product (this would be everything under a blank row to the next blank row.
So below is a small example.
I would like to automatically insert a row after the last "1 Gallon Homo" and another blank after the last "1 Gallon Skim", then go to column I and have an average for all the weight differences in that section
(column G is the measured weight in grams and row H is the target weight in grams -- column I is H - G and columns B -- F are not needed for this report)
If you use VBA to figure this out, please include detailed instructions as I have very little experience with VBA.
thank you much
Lawrence
1 Gallon HomoFiller 6ROGER10/6/201513:10:15D39833974-9
1 Gallon HomoFiller 6ROGER10/6/201513:10:15A3979.53974-5.5
1 Gallon HomoFiller 6ROGER10/6/201513:10:15O3970.539743.5
1 Gallon HomoFiller 6ROGER10/6/201513:10:15C3974.53974-0.5
1 Gallon HomoFiller 6ROGER10/6/201513:10:15P39773974-3
1 Gallon HomoFiller 6ROGER10/6/201513:10:15M3973.539740.5
1 Gallon SkimFiller 6ROGER10/6/201511:03:11B39923985-7
1 Gallon SkimFiller 6ROGER10/6/201511:03:11C39893985-4
1 Gallon SkimFiller 6ROGER10/6/201511:03:11G3983.539851.5
1 Gallon SkimFiller 6ROGER10/6/201511:03:11C3986.53985-1.5
1 Gallon SkimFiller 6ROGER10/6/201511:03:11E3978.539856.5
1 Gallon SkimFiller 6ROGER10/6/201511:03:11H39953985-10
1 Gallon 1 %Filler 6ROGER10/6/201512:30:50I3960.5398221.5
1 Gallon 1 %Filler 6ROGER10/6/201512:30:50A3963.5398218.5
1 Gallon 1 %Filler 6ROGER10/6/201512:30:50L3969398213
1 Gallon 1 %Filler 6ROGER10/6/201512:30:50E3964398218
1 Gallon 1 %Filler 6ROGER10/6/201512:30:50B3961.5398220.5
1 Gallon 1 %Filler 6ROGER10/6/201512:30:50K3980.539821.5
1 Gallon 1 %Filler 6ROGER10/6/201512:01:09F3970398212
1 Gallon 1 %Filler 6ROGER10/6/201512:01:09C3972398210