Hi,
I am new to VBA and trying to automate some of my day to day work. So any help would be greatly appreciated.
I have searched the forums for what I need but nothing was matching what I need.
I have an excel sheet with several rows and in each row there are some months with values others without. I would like excel to copy the row and insert it underneath with month values separated.
For example this is the data that I have
[TABLE="class: grid, width: 1043"]
<TBODY>[TR]
[TD]Client #</SPAN>[/TD]
[TD]Name</SPAN>[/TD]
[TD]Sales order</SPAN>[/TD]
[TD]Item </SPAN>[/TD]
[TD]Jan</SPAN>[/TD]
[TD]Feb</SPAN>[/TD]
[TD]Mar</SPAN>[/TD]
[TD]Apr</SPAN>[/TD]
[TD]May</SPAN>[/TD]
[TD]Jun</SPAN>[/TD]
[TD]Jul</SPAN>[/TD]
[TD]Aug</SPAN>[/TD]
[TD]Sep</SPAN>[/TD]
[TD]Oct</SPAN>[/TD]
[TD]Nov</SPAN>[/TD]
[TD]Dec</SPAN>[/TD]
[/TR]
[TR]
[TD] 1,234 </SPAN>[/TD]
[TD]CC</SPAN>[/TD]
[TD]XX</SPAN>[/TD]
[TD]XXXX</SPAN>[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] 100.00 </SPAN>[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] 100.00 </SPAN>[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</TBODY>[/TABLE]
In this case I would like excel to copy this line again and separate Apr and July (more if there) to look like this: Can anyone please help? Thank you
[TABLE="width: 1043"]
<TBODY>[TR]
[TD]Client #</SPAN>[/TD]
[TD]Name</SPAN>[/TD]
[TD]Sales order</SPAN>[/TD]
[TD]Item </SPAN>[/TD]
[TD]Jan</SPAN>[/TD]
[TD]Feb</SPAN>[/TD]
[TD]Mar</SPAN>[/TD]
[TD]Apr</SPAN>[/TD]
[TD]May</SPAN>[/TD]
[TD]Jun</SPAN>[/TD]
[TD]Jul</SPAN>[/TD]
[TD]Aug</SPAN>[/TD]
[TD]Sep</SPAN>[/TD]
[TD]Oct</SPAN>[/TD]
[TD]Nov</SPAN>[/TD]
[TD]Dec</SPAN>[/TD]
[/TR]
[TR]
[TD] 1,234 </SPAN>[/TD]
[TD]CC</SPAN>[/TD]
[TD]XX</SPAN>[/TD]
[TD]XXXX</SPAN>[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] 100.00 </SPAN>[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] 1,234 </SPAN>[/TD]
[TD]CC</SPAN>[/TD]
[TD]XX</SPAN>[/TD]
[TD]XXXX</SPAN>[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] 100.00 </SPAN>[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</TBODY><COLGROUP><COL><COL><COL><COL span=13></COLGROUP>[/TABLE]
[TABLE="width: 1043"]
<TBODY>[TR]
[TD][/TD]
[/TR]
</TBODY>[/TABLE]
I am new to VBA and trying to automate some of my day to day work. So any help would be greatly appreciated.
I have searched the forums for what I need but nothing was matching what I need.
I have an excel sheet with several rows and in each row there are some months with values others without. I would like excel to copy the row and insert it underneath with month values separated.
For example this is the data that I have
[TABLE="class: grid, width: 1043"]
<TBODY>[TR]
[TD]Client #</SPAN>[/TD]
[TD]Name</SPAN>[/TD]
[TD]Sales order</SPAN>[/TD]
[TD]Item </SPAN>[/TD]
[TD]Jan</SPAN>[/TD]
[TD]Feb</SPAN>[/TD]
[TD]Mar</SPAN>[/TD]
[TD]Apr</SPAN>[/TD]
[TD]May</SPAN>[/TD]
[TD]Jun</SPAN>[/TD]
[TD]Jul</SPAN>[/TD]
[TD]Aug</SPAN>[/TD]
[TD]Sep</SPAN>[/TD]
[TD]Oct</SPAN>[/TD]
[TD]Nov</SPAN>[/TD]
[TD]Dec</SPAN>[/TD]
[/TR]
[TR]
[TD] 1,234 </SPAN>[/TD]
[TD]CC</SPAN>[/TD]
[TD]XX</SPAN>[/TD]
[TD]XXXX</SPAN>[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] 100.00 </SPAN>[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] 100.00 </SPAN>[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</TBODY>[/TABLE]
In this case I would like excel to copy this line again and separate Apr and July (more if there) to look like this: Can anyone please help? Thank you
[TABLE="width: 1043"]
<TBODY>[TR]
[TD]Client #</SPAN>[/TD]
[TD]Name</SPAN>[/TD]
[TD]Sales order</SPAN>[/TD]
[TD]Item </SPAN>[/TD]
[TD]Jan</SPAN>[/TD]
[TD]Feb</SPAN>[/TD]
[TD]Mar</SPAN>[/TD]
[TD]Apr</SPAN>[/TD]
[TD]May</SPAN>[/TD]
[TD]Jun</SPAN>[/TD]
[TD]Jul</SPAN>[/TD]
[TD]Aug</SPAN>[/TD]
[TD]Sep</SPAN>[/TD]
[TD]Oct</SPAN>[/TD]
[TD]Nov</SPAN>[/TD]
[TD]Dec</SPAN>[/TD]
[/TR]
[TR]
[TD] 1,234 </SPAN>[/TD]
[TD]CC</SPAN>[/TD]
[TD]XX</SPAN>[/TD]
[TD]XXXX</SPAN>[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] 100.00 </SPAN>[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] 1,234 </SPAN>[/TD]
[TD]CC</SPAN>[/TD]
[TD]XX</SPAN>[/TD]
[TD]XXXX</SPAN>[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] 100.00 </SPAN>[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</TBODY><COLGROUP><COL><COL><COL><COL span=13></COLGROUP>[/TABLE]
[TABLE="width: 1043"]
<TBODY>[TR]
[TD][/TD]
[/TR]
</TBODY>[/TABLE]