# SUMIF Question...

#### DMCGETTIGAN

##### New Member
...at least I think I should use SUMIF.

 10 A 20 B 30 C 15 A 25 B

<tbody>
</tbody>

I want to take Column A and add a percentage based on the what is in column B and place the total in C. IE A would equal to 10% B would equal 15% C would equal 5%.

I tried =SUMIF(A1:A5,"A",(A1*.1)) but am getting an error. Any assistance is great.

### Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

#### DMCGETTIGAN

##### New Member
And to make it even more interesting...

Is it possible to give it a minimum.

Example: Row 1 column C would equal 1. Could I make it that sum or 2 whatever is greater?

#### barry houdini

##### MrExcel MVP
Try this formula in C2 copied down

=MAX(2,IF(B2="A",10%,IF(B2="B",15%,IF(B2="C",5%,0))))

#### DMCGETTIGAN

##### New Member
All of the results are "2". The last row should be "3.75"...

#### DMCGETTIGAN

##### New Member
Maybe I can make this easier...

Column B has various priority codes, approx 50 different codes. Column G has product cost in it. Each Priority code has its own percentage mark-up over cost. The "IF" statement works, but I exceed the amount of nestings. I do not have to worry about the minium any more. Any ideas?

#### Weazel

##### Well-known Member
maybe something like

=A1+LOOKUP(B1,{"A","B","C"},{0.1,0.15,0.05})

##### MrExcel MVP
Maybe I can make this easier...

Column B has various priority codes, approx 50 different codes. Column G has product cost in it. Each Priority code has its own percentage mark-up over cost. The "IF" statement works, but I exceed the amount of nestings. I do not have to worry about the minium any more. Any ideas?

You posted a sample in A1:B5...
 10 A 20 B 30 C 15 A 25 B

<colgroup><col style="width: 48pt;" span="3" width="64"> <tbody>
</tbody>

What are the desired/expected outcomes?

#### barry houdini

##### MrExcel MVP
All of the results are "2". The last row should be "3.75"...

Apologies, I edited the formula and took out a vital part, try like this

=MAX(2,A2*IF(B2="A",10%,IF(B2="B",15%,IF(B2="C",5%,0))))

#### DMCGETTIGAN

##### New Member
This is what my ideal chart would look like. Columns I and J would be filled out based on what is in Column B. The percentage in column I would be populated based on what is in B. I do not nee to worry about minimums any more.

Thank You for all the help.

 A B C D E F G H I J DATE PRIORITY EMP SOR CUST PART # COST SO % FREIGHT XXX DAWE XXX XXX XXX XXX 4.50 XXX 10% .45 XXX DAWE XXX XXX XXX XXX 4.77 XXX 10% .47 XXX DAWE XXX XXX XXX XXX 10.91 XXX 10% 1.91 XXX HVWC XXX XXX XXX XXX 11.63 XXX 5% .58 XXX HVWE XXX XXX XXX XXX 60.66 XXX 10% 6.06 XXX FDWE XXX XXX XXX XXX 120.56 XXX 15% 18.08 XXX GKWE XXX XXX XXX XXX 5.63 XXX 10% .56

<tbody>
</tbody>

##### MrExcel MVP
And what are the desired results?

Replies
5
Views
286
Replies
1
Views
431
Replies
1
Views
140
Replies
8
Views
104
Replies
19
Views
227

1,195,640
Messages
6,010,876
Members
441,571
Latest member
stolenweasel

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