This is the scenario:
I want to be able to input a numerical value in a form field.
Depending on that value, the form field below it will automatically populate with another numerical value.
In Excel I do it like this:
=IF(L2>=1000001,"700",IF(L2>=500001,"420",IF(L2>=200001,"220",IF(L2>=100001,"150",IF(L2>=80001,"100",IF(L2>=50001,"60",IF(L2<=50000,"40")))))))
Basically if the input value of text box 1 is greater than 1,000,001 then the next text box will read 700
At greater than or equal to 500,001 it will read 420.
And so on...
I would also like to add a third text box that will automatically calculate a percentage based on the first text box value, so if text box 1 is greater than or equal to 500,001 then text box 3 will equal 4% of the value of text box 1. If text box 1 is greater than or = to 250,001 then text box 3 will = 3% of value of text box 1, and so on...
That's the easiest way to describe what I'm trying to achieve.
Eventually I'd like to incorporate VAT calculations and other bits and bobs, all of which will be saved into a database via ASP when a save/submit button is clicked.
All I've managed so far is a very large headache.
Any (polite) suggestions gratefully received.
I want to be able to input a numerical value in a form field.
Depending on that value, the form field below it will automatically populate with another numerical value.
In Excel I do it like this:
=IF(L2>=1000001,"700",IF(L2>=500001,"420",IF(L2>=200001,"220",IF(L2>=100001,"150",IF(L2>=80001,"100",IF(L2>=50001,"60",IF(L2<=50000,"40")))))))
Basically if the input value of text box 1 is greater than 1,000,001 then the next text box will read 700
At greater than or equal to 500,001 it will read 420.
And so on...
I would also like to add a third text box that will automatically calculate a percentage based on the first text box value, so if text box 1 is greater than or equal to 500,001 then text box 3 will equal 4% of the value of text box 1. If text box 1 is greater than or = to 250,001 then text box 3 will = 3% of value of text box 1, and so on...
That's the easiest way to describe what I'm trying to achieve.
Eventually I'd like to incorporate VAT calculations and other bits and bobs, all of which will be saved into a database via ASP when a save/submit button is clicked.
All I've managed so far is a very large headache.
Any (polite) suggestions gratefully received.