Macro to transfer data from single to multiple columns
Closed
NoWhiteFlags
Posts
1
Registration date
Thursday 1 October 2015
Status
Member
Last seen
1 October 2015
-
1 Oct 2015 à 14:56
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 6 Oct 2015 à 12:02
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 6 Oct 2015 à 12:02
Related:
- Macro to transfer data from single to multiple columns
- Transfer data from excel to excel - Guide
- How to export data from facebook - Guide
- Free fire transfer - Guide
- How to copy data from one excel sheet to another - Guide
- How to transfer mini dvd to computer - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday 12 September 2010
Status
Contributor
Last seen
27 December 2022
555
6 Oct 2015 à 12:02
6 Oct 2015 à 12:02
Hi NWF,
Since every new scan will be put in the A column, column A can't be used as shown in your second pic.
Try the following code:
Best regards,
Trowa
Since every new scan will be put in the A column, column A can't be used as shown in your second pic.
Try the following code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Columns("A:A")) Is Nothing Then Exit Sub
Dim lCol As Integer
If IsNumeric(Target.Value) = False Then
Cells(1, Columns.Count).End(xlToLeft).Offset(0, 1).Value = Target.Value
Else
lCol = Cells(1, Columns.Count).End(xlToLeft).Column
Cells(Rows.Count, lCol).End(xlUp).Offset(1, 0).Value = Target.Value
End If
End Sub
Best regards,
Trowa


