Hi
Really new to VBA and Macro's so any help would be much appreciated
I have a spreadsheet that contains data that needs to be pasted to a different worksheet depending on cell value.
For instance:
[TABLE="width: 207"]
<colgroup><col width="116" style="width: 87pt; mso-width-source: userset; mso-width-alt: 4242;"> <col width="82" style="width: 62pt; mso-width-source: userset; mso-width-alt: 2998;"> <col width="77" style="width: 58pt; mso-width-source: userset; mso-width-alt: 2816;"> <tbody>[TR]
[TD="width: 116, bgcolor: transparent"]Cash Net[/TD]
[TD="width: 82, bgcolor: transparent"]CASH Vat[/TD]
[TD="width: 77, bgcolor: transparent"]CASH Gross[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]22.5[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]7.5[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]385.2[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]6.99[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]
I need to code to search the worksheet for Cash Net, Cash Vat, Cash Gross and if found paste the cells directly below it into specific cells in a new worksheet.
I can do this using the Macro recorder but...
The work sheet in question may not ALWAYS contain Cash Net, Cash Vat or Cash Gross. And sometimes the values might be found in different cells. So basically, if the worksheet does not contain Cash Net, I need it to ignore that and move onto searching for Cash Vat. Cash Net maybe in cell A1 (for instance) in one sheet but A4 in another sheet.
Any help on this would be fantastic and give me a great start on my project.
Thanks,
Really new to VBA and Macro's so any help would be much appreciated
I have a spreadsheet that contains data that needs to be pasted to a different worksheet depending on cell value.
For instance:
[TABLE="width: 207"]
<colgroup><col width="116" style="width: 87pt; mso-width-source: userset; mso-width-alt: 4242;"> <col width="82" style="width: 62pt; mso-width-source: userset; mso-width-alt: 2998;"> <col width="77" style="width: 58pt; mso-width-source: userset; mso-width-alt: 2816;"> <tbody>[TR]
[TD="width: 116, bgcolor: transparent"]Cash Net[/TD]
[TD="width: 82, bgcolor: transparent"]CASH Vat[/TD]
[TD="width: 77, bgcolor: transparent"]CASH Gross[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]22.5[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]7.5[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]385.2[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]6.99[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]
I need to code to search the worksheet for Cash Net, Cash Vat, Cash Gross and if found paste the cells directly below it into specific cells in a new worksheet.
I can do this using the Macro recorder but...
The work sheet in question may not ALWAYS contain Cash Net, Cash Vat or Cash Gross. And sometimes the values might be found in different cells. So basically, if the worksheet does not contain Cash Net, I need it to ignore that and move onto searching for Cash Vat. Cash Net maybe in cell A1 (for instance) in one sheet but A4 in another sheet.
Any help on this would be fantastic and give me a great start on my project.
Thanks,