How do I use the value from a 3rd column when comparing 2 columns

jumpycakes

New Member
Joined
Apr 19, 2011
Messages
1
I have 3 columns:
A: All Products (text)
B: Sold Products (number)
C: New Products (text)

The Sold Products list is associated with the "All Products" column. I want to know the sales numbers for New Products, so I was thinking I'd compare columns A and C for matches. If there is a match use the B value that is associated to the A column. This number would end up in column D.

Example:

Apples|10|Bananas
Bananas|20|Candies
Candies|40|Apples
Dumplings|70|
Eggs|5|

So the first column would end up as:

Apples|10|Bananas|20|
Bananas|20|Candies|40|
Candies|40|Apples|10|
Dumplings|70|
Eggs|5|

Not sure how I would do that. Alternatively if there's a better solution than the one I proposed, that's fine too.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Perhaps this will work for you:

<b>Sheet1</b><br /><br /><table border="1" cellspacing="0" cellpadding="0" style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:73px;" /><col style="width:21px;" /><col style="width:58px;" /><col style="width:21px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td > </td><td >A</td><td >B</td><td >C</td><td >D</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >1</td><td >Apples</td><td style="text-align:right; ">10</td><td >Bananas</td><td style="text-align:right; ">20</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >2</td><td >Bananas</td><td style="text-align:right; ">20</td><td >Candies</td><td style="text-align:right; ">40</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >3</td><td >Candies</td><td style="text-align:right; ">40</td><td >Apples</td><td style="text-align:right; ">10</td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >4</td><td >Dumplings</td><td style="text-align:right; ">70</td><td > </td><td > </td></tr><tr style="height:18px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >5</td><td >Eggs</td><td style="text-align:right; ">5</td><td > </td><td > </td></tr></table><br /><table style="font-family:Arial; font-size:10pt; border-style: groove ;border-color:#00ff00;background-color:#fffcf9; color:#000000; "><tr><td ><b>Spreadsheet Formulas</b></td></tr><tr><td ><table border = "1" cellspacing="0" cellpadding="2" style="font-family:Arial; font-size:9pt;"><tr style="background-color:#cacaca; font-size:10pt;"><td >Cell</td><td >Formula</td></tr><tr><td >D1</td><td >=SUMIF(A:A,C1,B:B)</td></tr><tr><td >D2</td><td >=SUMIF(A:A,C2,B:B)</td></tr><tr><td >D3</td><td >=SUMIF(A:A,C3,B:B)</td></tr></table></td></tr></table>
 
Upvote 0

Forum statistics

Threads
1,224,507
Messages
6,179,176
Members
452,893
Latest member
denay

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