HalfBaked01
New Member
- Joined
- Jan 17, 2018
- Messages
- 4
Hello,
New here, I attempted to search for a solution but could not find what I was looking for so thank you in advance.
I am trying to write VBA code to copy rows of data based on a value into a new sheet and save this sheet with a cell value name
[TABLE="width: 500"]
<tbody>[TR]
[TD]Date Header
[/TD]
[TD]Company Header
[/TD]
[TD]Total Amount Header
[/TD]
[TD]Invoice Number
[/TD]
[TD]Invoice Amount
[/TD]
[/TR]
[TR]
[TD]1/17/18
[/TD]
[TD]ABC Company
[/TD]
[TD]$1,000
[/TD]
[TD]12345
[/TD]
[TD]$100
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]12346
[/TD]
[TD]$900
[/TD]
[/TR]
[TR]
[TD]1/17/18
[/TD]
[TD]BCD Company
[/TD]
[TD]$500
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1/17/18
[/TD]
[TD]CDE Company
[/TD]
[TD]$450
[/TD]
[TD]ABC123
[/TD]
[TD]-1745
[/TD]
[/TR]
</tbody>[/TABLE]
Above is a sample of what the data looks like, I am attempting to copy based on separate payments that were received.
A few notes;
Company Header will have duplicates
Total Amount could be duplicate but highly unlikely
Invoice Number could be blank
Invoice amount could be blank
Below is how I would like it to look saved as a separate file based on Company name;
[TABLE="width: 500"]
<tbody>[TR]
[TD]Date Header
[/TD]
[TD]Company Header
[/TD]
[TD]Total Amount Header
[/TD]
[TD]Invoice Number
[/TD]
[TD]Invoice Amount
[/TD]
[/TR]
[TR]
[TD]1/17/18
[/TD]
[TD]ABC Company
[/TD]
[TD]$1,000
[/TD]
[TD]12345
[/TD]
[TD]$100
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]12346
[/TD]
[TD]$900
[/TD]
[/TR]
</tbody>[/TABLE]
Again, thank you for your help
-Novice VBA User
New here, I attempted to search for a solution but could not find what I was looking for so thank you in advance.
I am trying to write VBA code to copy rows of data based on a value into a new sheet and save this sheet with a cell value name
[TABLE="width: 500"]
<tbody>[TR]
[TD]Date Header
[/TD]
[TD]Company Header
[/TD]
[TD]Total Amount Header
[/TD]
[TD]Invoice Number
[/TD]
[TD]Invoice Amount
[/TD]
[/TR]
[TR]
[TD]1/17/18
[/TD]
[TD]ABC Company
[/TD]
[TD]$1,000
[/TD]
[TD]12345
[/TD]
[TD]$100
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]12346
[/TD]
[TD]$900
[/TD]
[/TR]
[TR]
[TD]1/17/18
[/TD]
[TD]BCD Company
[/TD]
[TD]$500
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1/17/18
[/TD]
[TD]CDE Company
[/TD]
[TD]$450
[/TD]
[TD]ABC123
[/TD]
[TD]-1745
[/TD]
[/TR]
</tbody>[/TABLE]
Above is a sample of what the data looks like, I am attempting to copy based on separate payments that were received.
A few notes;
Company Header will have duplicates
Total Amount could be duplicate but highly unlikely
Invoice Number could be blank
Invoice amount could be blank
Below is how I would like it to look saved as a separate file based on Company name;
[TABLE="width: 500"]
<tbody>[TR]
[TD]Date Header
[/TD]
[TD]Company Header
[/TD]
[TD]Total Amount Header
[/TD]
[TD]Invoice Number
[/TD]
[TD]Invoice Amount
[/TD]
[/TR]
[TR]
[TD]1/17/18
[/TD]
[TD]ABC Company
[/TD]
[TD]$1,000
[/TD]
[TD]12345
[/TD]
[TD]$100
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]12346
[/TD]
[TD]$900
[/TD]
[/TR]
</tbody>[/TABLE]
Again, thank you for your help
-Novice VBA User