VBA code to change the Sheet 1 data as per Sheet 2

motherindia

Board Regular
Joined
Oct 15, 2015
Messages
218
Hello Sir,

I have 2 sheets. Sheet 1 contains 5 columns and Cust No is unique id. I need to combine the amount based on Cust No and also get the latest value for Type /1002 against SAP Period .

I need to automate to do this in VBA.
Input on Sheet 1
Cust NoNameSAP PeriodTypeAmt
1A201005/1001-30,637.00
2B200804/1001-1,974.00
2B200805/10011,000.00
3C200810/1001-8,606.00
4D200802/1001-2,074.00
4D200803/1002-10,721.00
4D200805/1002-2,531.00
Output on Sheet 2
Cust NoTotal (/1001+/1002)//1002
1-30,637.000
2-974.001,000.00
3-8,606.000
4-15,236.00-2,531.00

<tbody>
</tbody>

Regards,
motherindia
 
Last edited:

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,214,927
Messages
6,122,311
Members
449,080
Latest member
jmsotelo

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