## Auto-Fill in of minimum value

NY2CA

Total Posts

59

Like

1

3

NY2CA

Total Posts

59

Like

1

3
NY2CA

31-03-2013

I have two cells being calculated. I want the the third cell to automatically fill-in based upon the lesser of those two values.

Example: If cell1 = 5 and cell2 = 7, cell3 should autofill with 5, the lessor of the two

If cell1 = 5 and cell2 =3, cell3 sould fill with 3.

Formula so far in layout:

if (MaxLoan > MaxLoanLTV) then // NewLoan

MaxLoan.presence = "visible"

MaxLoanLTV.presence = "hidden"

elseif (MaxLoanLTV > MaxLoan) then

MaxLoan.presence = "hidden"

MaxLoanLTV.presence = "visible"

endif

Formula in calculate:

\$ = sum(MaxLoan) // NewLoan

\$ = sum(MaxLoanLTV) // NewLoan

It does reflect a number but not the minimum value.

Thank you.

#### Accepted Solutions (1)

Mandy_Wiesener

Total Posts

194

Likes

23

22

Mandy_Wiesener

Total Posts

194

Likes

23

22
Mandy_Wiesener

01-04-2013

Hi,

you have t copy this script in the calculate event of your target field, use Javascript.

`this.rawValue =  Math.min(num_1.rawValue, num_2.rawValue);`

Hope it will helps you,

Mandy

NY2CA

Total Posts

59

Like

1

3

NY2CA

Total Posts

59

Like

1