# Combining Formulas

#### Spencer25

##### Board Regular
Hi everyone,
Thanks in advance for looking at this, here is a quick run down.

I have a spreadsheet that monitors production units required for a given week in Column "F".

The next column "G" has what was actually produced in it.

The next column "H" has the difference between the two. If the amount in Column G is less than or equal to 95% of the required production "F", the shortage is recorded in column "I" ( it will be added to the next weeks upcoming production (manually)- please see formula below.

This upcoming weeks order is pulled into column "J"

If the amount in Column G is greater than or equal to 110% of the required production "F", the overage is recorded in column "K" ( it will be deducted from the next weeks upcoming production (manually)- please see formula below.

I would like to combine the two criteria into one column if possible.

Formula in cell "I"
=IF(H9>0,"",(IF((H9*-1)>0.04999*F9,-H9,"")))

Formula in cell "K"
=IF(\$B9="","",IF(H9<0,"",(IF(H9>0.09999*F9,-H9,""))))

### Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

#### texasalynn

##### Well-known Member
is this what you want?
Code:
``=IF(H9>0,"",(IF((H9*-1)>0.04999*F9,-H9,IF(\$B9="","",IF(H9<0,"",(IF(H9>0.09999*F9,-H9,"")))))))``

#### Spencer25

##### Board Regular
Hi, no this won't work because of the conflicting H<0 and H>0 I think. Also, I don't think I should have to use .049999 etc. there should be a less than or equal to function, correct? Thanks again

#### barry houdini

##### MrExcel MVP
What's the formula in H9?

Assuming you want a positive value for an "overage" and negative for a shortage try this formula

=IF(B9="","",IF(OR(F9/G9<=0.95,F9/G9>=1.1),G9-F9,""))

You can adjust it if you need always want positive values

#### Spencer25

##### Board Regular
Thanks very much - that works great!

Replies
20
Views
282
Replies
3
Views
26
Replies
2
Views
66
Replies
8
Views
179
Replies
3
Views
36