# Embedded IF Function

#### mrskidder

##### New Member
I am trying to do an IF function where there are 3 possible scenarios.

The first Scenario is if the Pay Frequency is a S then the dollars are multiplied by 2
The second Scenario is if the Pay Frequency is a W then the dollars are multiplied by 52 and divided by 12 (to get a monthly amount)
The final Scenario is if the Pay Frequency is a M then it is just the dollar amount cell.

Here is what I have come up with:

=IF(D2=S,C2*2,IF(D2=W,C2*52/12,IF(D2=M,C2)))

The above function is coming back with a #NAME? error.

Any thoughts?

### Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
You need to put your text in quotes:

=IF(D2="S",C2*2,IF(D2="W",C2*52/12,IF(D2="M",C2))

You may also want to consider adding a false argument for your last IF statement unless you want it to display FALSE when D2 does not equal any of those options.

Thank you!! I forgot about putting quotes around text.

Thank you!! I forgot about putting quotes around text.

You're welcome.

Replies
5
Views
169
Replies
4
Views
368
Replies
5
Views
201
Replies
0
Views
269
Replies
0
Views
294

1,202,958
Messages
6,052,785
Members
444,600
Latest member
margr

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back