PDA

View Full Version : Using VBA to insert a row if condition is met in Excel



mswon20
10-05-2018, 06:08 PM
I'm trying to write a code that will do the following
1) If cells in column D is larger than 99
2) Minus 99 form column D and Insert a row below
3) copy data from columns A-C:E-F into the new row created below, the column D in the new row should be the remainder of n-99
4) If cells in column D in the new row created is larger than 99, repeat step 2-3 again

As I am still new to VBA, I could not to write anything that works. I appreciate any help you can provide. Thanks.