Copy a cell until a criteria is met

analyst3

New Member
Joined
Jun 18, 2014
Messages
36
Hey All,

I am pretty new at this, I wanted to a create a VBA code or an If statement where the code would start with the Inv. Date "10/13/2011" and if the corresponding EOmonth "39385" is less than the Eomonth code "39477,39506,39537" then copy the Amt"8,572.20". However, I would like it to be copied only until the date mentioned in the Cobroker Eomonth Column"39477" so for the first one the amount of 8572.2 should be in Jan 2012 but not Feb 2012. Also, once this ends "Dec 2012" the columns are blank in that case i would like the loop to go to the next row. Please help, I have 5000 line items.





Inv.Co broker invoice dateInv.Cobroker394773950639537
DateEomonthAmountEomonth Jan 2012Feb 2012Mar 2012
10/13/20111/30/201239385(8,572.20)39477-8572.2
11/28/20111/20/201239415(500.00)39477

<tbody>
</tbody><colgroup><col><col><col><col><col><col span="3"></colgroup>
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,214,976
Messages
6,122,543
Members
449,089
Latest member
davidcom

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