Can anyone help me perform the following…
example:
A B C D
row 1 ODZN 2 3
row 2 EAXO 3 4
I need a IF then statement which gives this logic…
- If
A:1isODZN,thenD1=(B:1)*(C:1)*5, else if - If
A:2isEAXO, thenD1=(B:2)*(C:2)*20… and so on with different variables….
every different variable has a different multiplier…….
and I’ll copy and drag the formula down a large set of data and eventually into a macro
could anyone help.. and possibly advise me what I need to define as a variable…
The multiplier is set by me manually. The variables will be defined in excel.
Thanks!!
I suppose you mean:
Answer:
and then drag.
You can nest as many
IFas you want. (Here I use I an unnecessary0to show howIFcan be nested, it can be simplified asIF(A1="ODZN",5,20)).Of course, you can write a function, then it will be like
However, macros need authentication to run in later versions of Excel. I would recommend the formula solution if the value variation is not that many.