View Single Post
 
Old 10-17-2021, 05:06 AM
p45cal's Avatar
p45cal p45cal is offline Windows 10 Office 2019
Expert
 
Join Date: Apr 2014
Posts: 871
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

You can try a function like this:
Code:
Function ConcatRows(sce, WhichRows)
For Each rw In WhichRows
  Z = Z & sce.Cells(rw).Value
Next rw
ConcatRows = Z
End Function
and use it in a worksheet thus:
=ConcatRows(A1:A15,D1:D4)
or:
=ConcatRows(A1:A15,{2,4,6,8})


No checks or bells and whistles.
Reply With Quote