sum if-match quantity

Stacy Rueda

Board Regular
Joined
Jun 23, 2016
Messages
87
Hi guys,

I have this excel file that I don't know how to start or what to use function or necessarily for macro.

I have input sheet, like below: When I input No. and quantity then it will sum to another sheet that match to the column that I inputted.

So, once I input No. 1-A, then quantity to other column will become 150, or if negative -50, then it will become 50.


[TABLE="width: 223"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD="colspan: 2"]INPUT DATA[/TD]
[/TR]
[TR]
[TD]No.[/TD]
[TD]1-A[/TD]
[/TR]
[TR]
[TD]QTY.[/TD]
[TD="align: right"]50

[/TD]
[/TR]
</tbody>[/TABLE]

[TABLE="width: 256"]
<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 64"]No[/TD]
[TD="class: xl65, width: 64"]QTY[/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[/TR]
[TR]
[TD="class: xl65"]1-A[/TD]
[TD="class: xl65, align: right"]100[/TD]
[TD="colspan: 2"] Quantity will become 150[/TD]
[/TR]
[TR]
[TD="class: xl65"]2-B[/TD]
[TD="class: xl65, align: right"]89[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl65"]3-C[/TD]
[TD="class: xl65, align: right"]100[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl65"]4-D[/TD]
[TD="class: xl65, align: right"]100[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl65"]5-E[/TD]
[TD="class: xl65, align: right"]100[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl65"]6-F[/TD]
[TD="class: xl65, align: right"]102[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl65"]7-G[/TD]
[TD="class: xl65, align: right"]10[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl65"]8-H[/TD]
[TD="class: xl65, align: right"]1092[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl65"]9-I[/TD]
[TD="class: xl65, align: right"]1082[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl65"]10-J[/TD]
[TD="class: xl65, align: right"]192[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl65"]11-K[/TD]
[TD="class: xl65, align: right"]1982[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl65"]12-L[/TD]
[TD="class: xl65, align: right"]1762[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Hope you guys can help me. Thank you in advance.
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hi @aqeelnokia99, I want to create macro (but don't know how to start) that will compute automatically Quantity when I input quantity from other sheet. Once I input No. 1-A, then quantity to other column will become 150, or if negative -50, then it will become 50.

INPUT DATA SHEET
No. QTY.
1-A 50

RESULT:

[TABLE="class: cms_table, width: 256"]
<tbody>[TR]
[/TR]
[TR]
[TD="class: cms_table_xl65, width: 64"]No[/TD]
[TD="class: cms_table_xl65, width: 64"]QTY[/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65"]1-A[/TD]
[TD="class: cms_table_xl65, align: right"]100[/TD]
[TD="colspan: 2"]Quantity will become 150[/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65"]2-B[/TD]
[TD="class: cms_table_xl65, align: right"]89[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: cms_table_xl65"]3-C[/TD]
[TD="class: cms_table_xl65, align: right"]100[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
if u put A1 in qty table its add 50 +??? or its become 150 for all and waht about 2-b and 3-c ? i can make a formula not macro
 
Upvote 0
if its based on qty u want if u enter 100 in qty its become 150 if u eneter 50 its add 100 and become 150 if u add 30 its add 120 and become 150 ???
 
Upvote 0

Forum statistics

Threads
1,223,907
Messages
6,175,301
Members
452,633
Latest member
DougMo

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