I am using the below formula to extract the smallest value from the data

Code:

`=SMALL(IF(($G$2=gsm_pc_weight_ref_no)*($J$2=gsm_pc_weight_design_color_name)*($H$2>=gsm_pc_weight_date)*($I$2<=gsm_pc_weight_date),gsm_pc_weight_value,""),ROW(1:1))`

Cells H2 & I2 in the formula represents dates (From - To)

The problem I am having is when both dates are equal than the formula works fine.

But as soon as I change the From date or To date then the formula gives error #NUM !

Am I doing anything wrong

Any help would be appreciated.