How do I create a sum based on a selection from a Dropdown box?

How do I create a sum based on a selection from a Dropdown box?

I am trying to work out a sum based on a selection from a Dropdown box.
If the selection from the Dropdown is chosen and a figure is entered into a separate cell then an answer to a sum is then displayed in a separate cell. I think it is more straight forward than I am making it to be.

If I chose a company in C5, enter a figure in E5 then I would like a result to appear in G5 & H5 based on the loan amount multiplied by the relevant figure.

How can I do this?

enter image description here

答案1

If your Lender data validation list in C5 is =$J$4:$J$31 as per your example

for loan amount in E5

The Gross Proc formula in G5 would be

=IFERROR(E5*VLOOKUP(C5,J4:L31,2,FALSE),"")

and the Net Proc formula in G5 would be

=IFERROR(E5*VLOOKUP(C5,J4:L31,3,FALSE),"")

答案2

If your Dropdown Box is in C5, the Loan in E5 and your Array (Lender Gross Net) in J,K,L J2:L30 for example, write in G5: =IF(AND(ISBLANK(C5),ISBLANK(E5)),"",E5*IF(ISERROR(VLOOKUP(C5,$J$2:$L$30,2)),0,VLOOKUP(C5,$J$2:$L$30,2)))
and in H5: =IF(AND(ISBLANK(C5),ISBLANK(E5)),"",E5*IF(ISERROR(VLOOKUP(C5,$J$2:$L$30,3)),0,VLOOKUP(C5,$J$2:$L$30,3)))
Where E5*IF() is your Formula (I looked for the corresponding value of Gross and Net for a given company in C5

相关内容