Hello friends,
I want to find the minimum(earliest) and maximum(latest) date from range D3:D6 for a certain product and region.
My parent data ranges from E2 to G6.
I have placed a drop down for regions( A and B) at D11, and E11 contains product number.
At B11 and C11 , I have written the formulae to get latest date and earliest date, respectively.
At B11, formula for latest date: =SUMPRODUCT(MAX($E$3:$E$6,($F$3:$F$6=$D$11)*($G$3:$G$6=$E$11)))
at C11, formula for earliest date: {=MIN(IF($F$3:$F$6=$D$11,IF($G$3:$G$6=$E$11,$E$3:$E$6,"")))}..array formula
Both the formula are working fine when my region at D11 is "A"
But when I change the region to "B", my latest date remains 12/7/2012 (which is the latest date for the region "A")....seems formula not fetching the latest date for other region though the reference cell for the region is same(D11) in the formula.I am not able to understand why the value is not changing at B11 when I change the region for same formula!!
And again, If I apply the same sumproduct formula (with MIN) to identify the earliest date when region ="A" and Product No. =133, I am getting 1/0/1900 at C11....don't understand why it happens!!
and C11 becomes 1/0/1900...however, for region B, the max and min date should be same as for this region and product number there is only one row.(In this part I know I am doing something wrong, but not able to figure out the right way)
I have uploaded the file here for further understanding of the data:
https://hotfile.com/dl/164629091/f4554de/Latest_and_earliest_date.xlsx.html
Your help is much appreciated.
Regards,
Kaushik
I want to find the minimum(earliest) and maximum(latest) date from range D3:D6 for a certain product and region.
My parent data ranges from E2 to G6.
I have placed a drop down for regions( A and B) at D11, and E11 contains product number.
At B11 and C11 , I have written the formulae to get latest date and earliest date, respectively.
At B11, formula for latest date: =SUMPRODUCT(MAX($E$3:$E$6,($F$3:$F$6=$D$11)*($G$3:$G$6=$E$11)))
at C11, formula for earliest date: {=MIN(IF($F$3:$F$6=$D$11,IF($G$3:$G$6=$E$11,$E$3:$E$6,"")))}..array formula
Both the formula are working fine when my region at D11 is "A"
But when I change the region to "B", my latest date remains 12/7/2012 (which is the latest date for the region "A")....seems formula not fetching the latest date for other region though the reference cell for the region is same(D11) in the formula.I am not able to understand why the value is not changing at B11 when I change the region for same formula!!
And again, If I apply the same sumproduct formula (with MIN) to identify the earliest date when region ="A" and Product No. =133, I am getting 1/0/1900 at C11....don't understand why it happens!!
and C11 becomes 1/0/1900...however, for region B, the max and min date should be same as for this region and product number there is only one row.(In this part I know I am doing something wrong, but not able to figure out the right way)
I have uploaded the file here for further understanding of the data:
https://hotfile.com/dl/164629091/f4554de/Latest_and_earliest_date.xlsx.html
Your help is much appreciated.
Regards,
Kaushik