View Single Post
 
Old 05-29-2018, 01:27 PM
p45cal's Avatar
p45cal p45cal is offline Windows 10 Office 2016
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

A guess.

Select only a single block of cells NOT including date headers row, nor clients column:
Code:
Sub blah()
Set myRange = Selection
Set SceSht = Selection.Parent
Set NewSht = Sheets.Add
Set Destn = NewSht.Range("A2")
For Each rw In myRange.Rows
  If Application.CountBlank(rw) < rw.Cells.Count Then
    Destn.Value = SceSht.Cells(rw.Row, 3).Value
    Set Destn = Destn.Offset(1)
    For Each cll In rw.Cells
      If Len(cll.Value) > 0 Then
        Destn.Value = SceSht.Cells(3, cll.Column).Value
        cll.Copy Destn.Offset(, 1) 'this also copies comments but you can remove them en masse later.
        Destn.Offset(, 2).Value = cll.Comment.Text
        Set Destn = Destn.Offset(1)
      End If
    Next cll
  End If
Next rw
End Sub
Reply With Quote