Hi Everyone..
I have used the VBA code below to transfer data from another sheet to another sheet before.
___________________________________________________________
Sub RoundedRectangle6_Click()
Dim wsIN As Worksheet
Dim wsRegister_IN As Worksheet
Dim CopyLastRow As Long
Dim DestLastRow As Long
Set wsIN = Worksheets("IN")
Set wsRegister_IN = Worksheets("Register IN")
CopyLastRow = wsIN.Range("A" & wsIN.Rows.Count).End(xlUp).Row + 1
DestLastRow = wsRegister_IN.Range("A" & wsRegister_IN.Rows.Count).End(xlUp).Row + 1
wsIN.Range("A3", "J" & CopyLastRow).Copy Destination:=wsRegister_IN.Range("A" & DestLastRow)
wsIN.Range("A3", "A" & CopyLastRow).EntireRow.Delete
End Sub
______________________________________________________________
But I have one problem that all the data in the D & E column has extra space from the text.
I need to remove all the extra space to make sure the formulas in the other sheets can track all the available data.
This is how data with extra space from text >>
So I want to add a trim formula in the VBA code above.
Or is there another solution ?
Anyone can help me..
Thanks
I have used the VBA code below to transfer data from another sheet to another sheet before.
___________________________________________________________
Sub RoundedRectangle6_Click()
Dim wsIN As Worksheet
Dim wsRegister_IN As Worksheet
Dim CopyLastRow As Long
Dim DestLastRow As Long
Set wsIN = Worksheets("IN")
Set wsRegister_IN = Worksheets("Register IN")
CopyLastRow = wsIN.Range("A" & wsIN.Rows.Count).End(xlUp).Row + 1
DestLastRow = wsRegister_IN.Range("A" & wsRegister_IN.Rows.Count).End(xlUp).Row + 1
wsIN.Range("A3", "J" & CopyLastRow).Copy Destination:=wsRegister_IN.Range("A" & DestLastRow)
wsIN.Range("A3", "A" & CopyLastRow).EntireRow.Delete
End Sub
______________________________________________________________
But I have one problem that all the data in the D & E column has extra space from the text.
I need to remove all the extra space to make sure the formulas in the other sheets can track all the available data.
This is how data with extra space from text >>
So I want to add a trim formula in the VBA code above.
Or is there another solution ?
Anyone can help me..
Thanks