Hello all,

I created a "calculator" to determine the lesser of value (I8) out of three different values (F7, F8, & F9), so that I can compare that smallest value (I8/F12) to the value I have on file (F15) for each client.
If there is a difference in those values, I need to know if it exists (I12) and the value of that difference, taking into account two threshold values (I13).

My calculator works just fine for each "threshold value" I am using.

However, when I attempt to combine my formulas, I get a #VALUE! error for GAP Required, which I am assuming it's because of the text in the string and a TRUE value for the Amount Required, when I'm actually looking for a numeric value.

Calculator Tab, $5000 threshold.
I12
=IF(AND(D4=2301,2303,2304,2305,6900),IF((F15+5000)<F12,"Yes","N/A"),IF(F15<F12,"Yes","N/A"))
I13
=IF(AND(OR(D4=2301,D4=2303,D4=2304,D4=2305,D4=6900),I12="Yes"),F12-F15-5000,F12-F15)

RMS Tab, $1000 Threshold
I12
=IF(AND(D4=3057,3058,3059,3060,3061,3062,3063,3069,3070,3071,3072,3073,3074,3075,3101,3164,3212,4810,4814,7358,7359,7360),IF((F15+1000)<F12,"Yes","N/A"),IF(F15<F12,"Yes","N/A"))
I13
=IF(AND(OR(D4=3057,D4=3058,D4=3059,D4=3060,D4=3061,D4=3062,D4=3063,D4=3069,D4=3070,D4=3071,D4=3072,D4=3073,D4=3074,D4=3075,D4=3101,D4=3164,D4=3212,D4=4810,D4=4814,D4=7358,D4=7359,D4=7360),I12="Yes"),F12-F15-1000,F12-F15)
This are the formula's I combined that are proving to be troublesome, Sheet 1:
I12
=IF(OR(AND(D4=2301,2303,2304,2305,6900),AND(D4=3057,3058,3059,3060,3061,3062,3063,3069,3070,3071,3072,3073,3074,3075,3101,3164,3212,4810,4814,7358,7359,7360)),OR(IF((F15+5000)<F12,"Yes","N/A"),IF((F15+1000)<F12,"Yes","N/A")),OR(IF(F15<F12,"Yes","N/A"),IF(F15<F12,"Yes","N/A")))
I13
=IF(OR(AND(OR(D4=2301,D4=2303,D4=2304,D4=2305,D4=6900),I12="Yes"),AND(OR(D4=3057,D4=3058,D4=3059,D4=3060,D4=3061,D4=3062,D4=3063,D4=3069,D4=3070,D4=3071,D4=3072,D4=3073,D4=3074,D4=3075,D4=3101,D4=3164,D4=3212,D4=4810,D4=4814,D4=7358,D4=7359,D4=7360),I12="Yes")),OR((F12-F15-5000),(F12-F15-1000)),F12-F15)


For purposes of this post, my attachment has THREE tabs. Tab 1 - Calculator with $5,000 threshold for specific account numbers. Tab 2 - Calculator with $1,000 threshold for specific account numbers. Tab 3 - Calculator with formulas above and combined formula as well to test.

Lesser Of Calculator 2.xlsx

Thank you for any and all help!