ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF (https://www.excelbanter.com/excel-worksheet-functions/195966-if.html)

Karen6175

IF
 
I need to create a formula for the following scenario ... any help would be
appreciated!

If value in cell is 3, then multiply another cell by .376, If 4, multiply by
..668, and so on. For instance:

A1 = 3
B1 = 4.5
Formula Cell C1 should return 1.69
OR
A1 = 4
B1 = 4.5
Formula Cell C1 should return 3.01


Can this be done?


John C[_2_]

IF
 
If you are going to have many different multipliers, you could set up a
table. I like to set up tables on a separate tab named Tables.
In A1 type Value, in B1 type Multiplier.
In A2 type 3, in B2 type .376
In A3 type 4, in B3 type .668
etc.
Highlight selected Table area, and name it Tbl_Multiplier (or something to
that effect) go to menu Insert|Name|Define.

Then, on your original sheet, say you have A1=3, B1=4.5, type the following
into cell C1:
=ISERROR(VLOOKUP(A1,Tbl_Multiplier,2,FALSE),"",VLO OKUP(A1,Tbl_Multiplier,2,FALSE)*B1)
--
John C


"Karen6175" wrote:

I need to create a formula for the following scenario ... any help would be
appreciated!

If value in cell is 3, then multiply another cell by .376, If 4, multiply by
.668, and so on. For instance:

A1 = 3
B1 = 4.5
Formula Cell C1 should return 1.69
OR
A1 = 4
B1 = 4.5
Formula Cell C1 should return 3.01


Can this be done?


Mike H

IF
 
Karen,

Don't know what you mean by '..and so on' but try this

=B1*CHOOSE(A1,1,1,0.376,0.668)

Mike

"Karen6175" wrote:

I need to create a formula for the following scenario ... any help would be
appreciated!

If value in cell is 3, then multiply another cell by .376, If 4, multiply by
.668, and so on. For instance:

A1 = 3
B1 = 4.5
Formula Cell C1 should return 1.69
OR
A1 = 4
B1 = 4.5
Formula Cell C1 should return 3.01


Can this be done?


Gord Dibben

IF
 
Don't know how far "and so on" reaches but here's an example.

=LOOKUP(A1,{3,4,5,6,7},{0.376,0.668,0.999,1.376,1. 668})*B1


Gord Dibben MS Excel MVP

On Wed, 23 Jul 2008 06:33:03 -0700, Karen6175
wrote:

I need to create a formula for the following scenario ... any help would be
appreciated!

If value in cell is 3, then multiply another cell by .376, If 4, multiply by
.668, and so on. For instance:

A1 = 3
B1 = 4.5
Formula Cell C1 should return 1.69
OR
A1 = 4
B1 = 4.5
Formula Cell C1 should return 3.01


Can this be done?




All times are GMT +1. The time now is 07:40 AM.

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