SUMif or Adding numbers when 2 names are in one cell.

raindrop

Board Regular
Joined
Jul 31, 2011
Messages
57
Hello, I am looking to add the different Qtrs and in some cells, there are two of the names/Qtrs that I want to add. Example in green on column 4 below - I'd like to add the column stating: 1qtr,2qtr but I can't quite get it. Can anyone help? The formula I am using is:

((A1="1qtr")*B1+(A1="2qtr")*B1+(A1="3qtr")*B1+(A1="4qtr")*B1)*C1

<table width="256" border="0" cellpadding="0" cellspacing="0"><col width="64" span="4"><tr height="60"> <td class="xl65" style="height: 45pt; width: 48pt;" width="64" height="60">Column A</td> <td class="xl65" style="width: 48pt;" width="64">Column B</td> <td class="xl65" style="width: 48pt;" width="64">Column C</td> <td class="xl65" style="width: 48pt;" width="64">Output column/ formula</td> </tr></table><table style="width: 283px; height: 181px;" border="0" cellpadding="0" cellspacing="0"><tbody><tr style="height: 15pt;" height="20"><td class="xl66" style="height: 15pt; width: 48pt;" width="64" height="20">1qtr</td> <td class="xl67" style="width: 48pt;" width="64">100</td> <td class="xl67" style="width: 48pt;" width="64">2</td> <td class="xl73" style="width: 48pt;" width="64">200</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl68" style="height: 15pt;" height="20">2qtr</td> <td class="xl69">25</td> <td class="xl69">1</td> <td class="xl74">25</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl68" style="height: 15pt;" height="20">3QTR</td> <td class="xl69">10</td> <td class="xl69">1</td> <td class="xl74">10</td> </tr> <tr style="height: 15.75pt;" height="21"> <td class="xl70" style="height: 15.75pt;" height="21">1qtr, 2qtr</td> <td class="xl71">100</td> <td class="xl71">2</td> <td class="xl72">200</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">
</td> <td>
</td> <td>
</td> <td>
</td> </tr> <tr style="height: 45pt;" height="60"> <td class="xl65" style="height: 45pt; width: 48pt;" width="64" height="60">Column A</td> <td class="xl65" style="width: 48pt;" width="64">Column B</td> <td class="xl65" style="width: 48pt;" width="64">Column C</td> <td class="xl65" style="width: 48pt;" width="64">Output column/ formula</td> </tr> </tbody></table>
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Why there's a need to bother about the cell info in Col. A when you need to do is just multiply Col. B with Col. C...AS per your example it like this as I understood..
Thanks
 
Upvote 0
Actually, this is going to be a more complex formula, but I am trying to build it. I'll be placing the Qtr 1, Qtr 2, Qtr 3, Qtr 4 in separate columns. So the problem is if there is two names in one column, I will actually end up needing it to look more like the : where the formulas will go under the Qtr1-4 columns.

<table width="448" border="0" cellpadding="0" cellspacing="0"><col style="width: 48pt;" width="64" span="7"> <tbody><tr style="height: 15pt;" height="20"> <td style="height: 15pt; width: 48pt;" width="64" height="20">Qtr </td> <td style="width: 48pt;" width="64">Total</td> <td style="width: 48pt;" width="64"># of Trips</td> <td style="width: 48pt;" width="64">Qtr 1</td> <td style="width: 48pt;" width="64">Qtr 2</td> <td style="width: 48pt;" width="64">Qtr 3</td> <td style="width: 48pt;" width="64">Qtr 4</td> </tr> <tr style="height: 15.75pt;" height="21"> <td class="xl65" style="height: 15.75pt;" height="21">1qtr, 2qtr</td> <td class="xl66">100</td> <td class="xl66">2</td> <td class="xl67">50</td> <td class="xl68">0</td> <td class="xl68">50</td> <td class="xl68">0</td> </tr> </tbody></table>

Can you help?
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,833
Members
452,947
Latest member
Gerry_F

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top