Hi,
I have spreadsheet that want to copy another sheet and the date field has formula to copy date from above cell(s) the code copy sheet want to copy sheet with the headings and values to sheet1 but i having this issues
1. is not copy the headings just the records and start in row 2 and row 1 is blank where it should be the headings
2. date is copy formula instead of date values
here is what looks like my payment sheet and what's copying right now:
[TABLE="width: 891"]
<tbody>[TR]
[TD="align: right"]10/19/2018[/TD]
[TD]CAD[/TD]
[TD="align: right"]800.00[/TD]
[TD="align: right"]10/19/2018[/TD]
[TD]3[/TD]
[TD]9999[/TD]
[TD]3000[/TD]
[TD]mario[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]10/19/2018[/TD]
[TD]CAD[/TD]
[TD="align: right"]899.00[/TD]
[TD="align: right"]10/19/2018[/TD]
[TD]7[/TD]
[TD]339[/TD]
[TD]3087887[/TD]
[TD]Antonio[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
code here:
I have spreadsheet that want to copy another sheet and the date field has formula to copy date from above cell(s) the code copy sheet want to copy sheet with the headings and values to sheet1 but i having this issues
1. is not copy the headings just the records and start in row 2 and row 1 is blank where it should be the headings
2. date is copy formula instead of date values
here is what looks like my payment sheet and what's copying right now:
[TABLE="width: 891"]
<tbody>[TR]
[TD="align: right"]10/19/2018[/TD]
[TD]CAD[/TD]
[TD="align: right"]800.00[/TD]
[TD="align: right"]10/19/2018[/TD]
[TD]3[/TD]
[TD]9999[/TD]
[TD]3000[/TD]
[TD]mario[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]10/19/2018[/TD]
[TD]CAD[/TD]
[TD="align: right"]899.00[/TD]
[TD="align: right"]10/19/2018[/TD]
[TD]7[/TD]
[TD]339[/TD]
[TD]3087887[/TD]
[TD]Antonio[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
code here:
Code:
Private Sub CommandButton1_Click()a = Worksheets("Payments").Cells(Rows.Count, 1).End(xlUp).Row
For i = 2 To a
If Worksheets("Payments").Cells(i, 3).Value > "0" Then
Worksheets("Payments").Rows(i).Copy
Worksheets("Sheet1").Activate
b = Worksheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row
Worksheets("Sheet1").Cells(b + 1, 1).Select
ActiveSheet.Paste
Worksheets("Payments").Activate
End If
Next
Application.CutCopyMode = False
ThisWorkbook.Worksheets("Payments").Cells(1, 1).Select
End Sub
thank you,