Macro to transfer data from single to multiple columns
Closed
NoWhiteFlags
Posts
1
Registration date
Thursday October 1, 2015
Status
Member
Last seen
October 1, 2015
-
Oct 1, 2015 at 02:56 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen January 16, 2023 - Oct 6, 2015 at 12:02 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen January 16, 2023 - Oct 6, 2015 at 12:02 PM
Related:
- Macro to transfer data from single to multiple columns
- Transfer data from one excel worksheet to another automatically - Guide
- Free fire transfer - Guide
- Excel data validation list from table multiple columns - Guide
- Which key is used to make multiple line in a single cell - Guide
- How to delete multiple files at once - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
January 16, 2023
549
Oct 6, 2015 at 12:02 PM
Oct 6, 2015 at 12:02 PM
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