Friday, October 3, 2014

yogi_Compute Average Number Of Purchases By ItemID For a Given Range Of Dates

                   Google Spreadsheet   Post  #1779
Yogi Anand, D.Eng, P.E.      ANAND Enterprises LLC -- Rochester Hills MI     www.energyefficientbuild.com.   Sep-27-2014
post by  QuickQuestionPlz:
(https://productforums.google.com/forum/#!category-topic/docs/spreadsheets/WBWTlUJ5WnE)
Please help with populating a column with data from other columns based on a condition
Hello all,

I'm a bit new to using Docs for spreadsheets, and was wondering if I could get some help really quick. Also, my apologies if I haven't worded this very well. Here's the scenario:

I'm working with some simple sales figures, and I want to know how to use some simple formulas for separating the data based on certain conditions. Here is a sample of the data I'll be working with:

dateitemIDpurchasesbuyers
1/1/20141107
1/2/2014186
1/3/20141138
1/1/2014263
1/2/2014264
1/3/2014253
1/1/2014322
1/2/2014311
1/3/2014333


I want to write a formula that figures out the average purchases for each item for between two dates. However, I will be working with thousands of items. Basically, the formula would populate a column like the Average Purchases column below, except it would do so for thousands of items instead of just 3.

Date RangeItemIDAverage Purchases
1/1/2014 - 1/3/2014110.33333333
1/1/2014 - 1/3/201425.666666667
1/1/2014 - 1/3/201432

Any help is greatly appreciated! Thanks!

------------------------------------------------------------------------------------------------------------------------