excel - Approximate match within a sub-array -
i have table following:
name quota-date quota ami 5/1/2010 75000 ami 1/1/2012 100000 ami 6/1/2014 150000 john 8/1/2014 0 john 4/1/2015 50000 rick 5/1/2011 100000
(dates shown in american format: m/d/yyyy). "quota date" first month of active new "quota" next it. e.g. ami's quota 75000 each month between may 2010 , december 2011.
i need formula fetch quota of given person , given month: active quota of person in every month. needed formula calculate third column of table:
name month quota ami 6/1/2010 75000 ami 12/1/2011 75000 ami 1/1/2012 100000 ami 7/1/2014 150000 john 10/1/2014 0 john 4/1/2015 50000
i prefer not maintain first table sorted, if make things simpler, would.
what correct formula "quota" on second table?
if new data in columns a-c , original data columns a-c in sheet1, enter formula in b2:
=sumifs(sheet1!c:c,sheet1!a:a,a2,sheet1!b:b,max(if((sheet1!a:a=a2)*(sheet1!b:b<=b2),sheet1!b:b,"")))
this formula works if have numbers in 3rd column, more complicated make working on text too.
Comments
Post a Comment