Help with formula

D

Dragos

Let's say I have in cell A1 a combo box with options:
1. Expense
2. Refund
3. Tax
In cell B1 I will type a number
In cell C3 I want a formula like this:
If in cell A1 I have selected 1. Expense than calculate B1*25
If in cell A1 I have selected 2. Refund than calculate B1*50
If in cell A1 I have selected 3. Tax than calculate B1*150

How can I apply the combo box to entire column, like if I go to row 2 to
find in B1 the combo box from A1 and in C2 the formula from C1
Thanks for the help
 
×

מיכ×ל (מיקי) ×בידן

In c1:
=IF(A1="Expense",B1*25,IF(A1="Refund",B1*50,B1*150))
Micky
 
P

Pete_UK

Put this in C1:

=IF(A1="1. Expense",25,IF(A1="2. Refund",50,IF(A1="3. Tax",150,0)))*B1

Copy it down as required.

Hope this helps.

Pete
 
×

מיכ×ל (מיקי) ×בידן

You also may consider using "Boolean Switches" without Ifs - something like:
=B1*((A1="Expense")*25+(A1="Refund")*50+(A1="Tax")*150)
Micky
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top