Excel Small If Formula For Multiple Criterias

hrayani

Well-known Member
Joined
Jul 23, 2010
Messages
1,516
Office Version
  1. 2016
Platform
  1. Windows
Hello Friends,

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))

CTL+SHF+ENT


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.
 


Code:
=IFERROR(SMALL(IF([COLOR=#ff0000](gsm_pc_weight_value>H4)[/COLOR]*(gsm_pc_weight_ref_no=$G$2)*(gsm_pc_weight_design_color_name=$J$2)*(gsm_pc_weight_date>=$H$2)*(gsm_pc_weight_date<=$I$2),gsm_pc_weight_value,""),1),"")[COLOR=#333333]
[/COLOR]

Let me know if there is a better way of doing this. I mean the added criteria marked in red for the unique values.

Best Regards,

Humayun

The solution seems very good to me.
 
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Dear DanteAmor & Marcelo


Thanks to both of you

Best Regards,

Humayun
 
Upvote 0

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top