See if this helps
VBA Noob![]()
Dim c As Range Dim NewSrt As String For Each c In Selection NewSrt = NewSrt & "," & c.Value Next Selection(1).Value = Mid(NewSrt, 2, 9 ^ 9)
See if this helps
VBA Noob![]()
Dim c As Range Dim NewSrt As String For Each c In Selection NewSrt = NewSrt & "," & c.Value Next Selection(1).Value = Mid(NewSrt, 2, 9 ^ 9)
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
Thanks Noob that works a treat.
Is there a way to delete the cells below selection(1) ? at the same time?
Addafter![]()
c.Clear
VBA Noob![]()
NewSrt = NewSrt & "," & c.Value
Noob this works perfectly. However I'm struggling to understand the linepresumably Selection (1) selects the first cell in the range but don't know what the 9^9 bit does?![]()
Selection(1).Value = Mid(NewSrt, 2, 9 ^ 9)
I use the mid function to get rid of the extra comma at the start.
Type =9^9 in a cell and it returns 387420489. This makes sure it shouldn't cut off any cells at the end of the mid function
CorrectSelection (1) selects the first cell in the range
VBA Noob
Thanks that's great![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks