ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Help with formula (https://www.excelbanter.com/excel-discussion-misc-queries/251262-help-formula.html)

Dragos

Help with formula
 
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

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

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


"Dragos" wrote:

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


Pete_UK

Help with formula
 
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

On Dec 17, 10:35*am, Dragos wrote:
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



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

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


"מיכאל (מיקי) אבידן" wrote:

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


"Dragos" wrote:

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


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

Help with formula
 
///and if your Validation List is located in the same sheet - this is going
to be much shorter:
http://img694.imageshack.us/img694/2626/nonamey.png
Micky


"מיכאל (מיקי) אבידן" wrote:

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


"Dragos" wrote:

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



All times are GMT +1. The time now is 12:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com