Generate values and dates in cells based on custom condition using vba macros

Hermione9908

New Member
Joined
Jun 28, 2022
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
Hello,
I have a task to generate a sheet containing following headers : Part Number, Quantity, Date
The quantity to be produced is given in one more sheet and that quantity needs to be distributed in that particular month.
For example:
captur1.PNG
Capture2.PNG





In the vba code, it has to refer the particular month; consider june month. The quantity for june month is 12. So 12 should be distributed in that june month. The output should be as shown in the right most image. The 3 columns should be updated as shown. The dates needs to be divided for that month and the quantity should match the actual quantity.
I want to use a generalized code for all the months and all the output should be in same format as right image.

How to do this with vba code in excel?
Please help.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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