Forum Discussion

Lilac's avatar
Lilac
Copper Contributor
Feb 24, 2020

IF formula with variable column value to plug into equation

I am trying to create a formula to fill a column where the variable in the equation is based off of the value in another column.  i.e.   column C can contain codes 01, 02, 03 ,04 ,05, 06, 07, 08.  if column c is 02,03,06, or 07 the variable multiplier is .30 .  IF c=02,03,06,07 then multiply column D Value by .30

 

If c = 01, 04, 08 then multiply column D value by .40.  Place value in column M

1 Reply

  • ChrisMendoza's avatar
    ChrisMendoza
    Iron Contributor

    Lilac-

    Something like the below:

    =IF(OR(C1=2,C1=3,C1=6,C1=7),1*0.3,1*0.4)

    * 1 used as a placeholder*

Resources