# Calculating If function

#### Gref

##### New Member
Trying to get the following result.

I want to add one cell G12 to the results of an IF function and then multiply the result by 10%. I want the IF function to use the lesser of two cells then add that figure to G12 and multiply by 10%. This is what I tried, but it didn't work. (Also, the first IF function is to recognize the name in C12)

=IF(C12="NAME",SUM(G12+IF((H12<i12)*(h12>I12),H12,I12))*0.1,"")

As an example:

If C12 = NAME AND G12 = \$10.00 and H12=\$20.00 and I12 =\$30.00 the result would be \$30.00 X 10% for a result of \$3.00

OR

If C12 = NAME AND G12 = \$10.00 and H12=\$40.00 and I12 = \$10.00 the result would be \$20.00 X 10% for a result of \$2.00
</i12)*(h12>

Last edited:

### Excel Facts

Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

#### Sektor

##### Well-known Member
=IF(C12="NAME",G12+MIN(H12,<i12)*(h12 style="color: rgb(51, 51, 51); background-color: rgb(250, 250, 250);">I12)*0.1,"")</i12)*(h12>

Last edited:

#### snjpverma

##### Well-known Member
Try if this works
=IF(C12="NAME",(G12+MIN(H12,I12)) *0.1,"")

Last edited:

#### Gref

##### New Member
Not working. Using G12 as \$10 H12 as \$20 and I12 as \$30 result with your formula is \$12.00 and should be \$3.00

#### snjpverma

##### Well-known Member
Not working. Using G12 as \$10 H12 as \$20 and I12 as \$30 result with your formula is \$12.00 and should be \$3.00

i am getting the return value as 3 with the help of the formula below.
=IF(C12="NAME",(G12+MIN(H12,I12))*0.1,"")

#### Marcílio_Lobão

##### Well-known Member
gref, Good evening.

A very good new year to all of you, Gref, Sektor and sanjeev1234.

The sanjeev1234's formula works correctly.

Gref, did you correctly enter the parentheses of the formula?

I hope it helps.

Replies
1
Views
250
Replies
9
Views
479
Replies
3
Views
162
Replies
4
Views
705
Replies
4
Views
249

1,191,719
Messages
5,988,296
Members
440,148
Latest member
sandy123

### 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