=Min(IF(B2>0, MAX(B2, X2)), Z2)
You need to be careful as if B2<=0 it will return an error
So maybe it should be
=Min(IF(B2>0, MAX(B2, X2),"B2<0"), Z2)
Concerning Hui's formula, I don't think you want to have the text result within the MIN statement, as it will just get ignored by the function and you'll only get the value of Z2. Rearranging things a little:
=IF(B2>0,MIN(Z2,MAX(B2,X2)),"B2 is less than 0")
I have a question on making a formula. I have built my own simple personal money management worksheet. I want to know how I can write a formula which can automatically deduct mortgage amount from my income every month by the 15th for the next 5 years. I have this data for the mortgage (monthly EMI) as an amortization table in the sheet and now I am manually doing it every month which gets automatically added to the expenses and simultaneously gets adjusted from my incomes. I tried lots of formulas mainly with IF but I cannot do it for more than a month. So do you think of any ways by which when I open my worksheet on a 15th the corresponding data for the 15th from the amortization table is automatically filled in the mortgage column under expenses and get deducted automatically from my income in my work sheet ?
Gross Income A1
Net Income A10
Expenses D1
Net Expenses D10
System Date : B1 (Now () May 15, 2012)
eg. Amortaziation Table EMI : A20: A 79 (60 months)