VBA - ALT+Enter (new line) in a Loop

前端 未结 1 760
自闭症患者
自闭症患者 2021-01-27 23:35

I am writing a macro to create a calendar in a new sheet based on an auto generated report. I have written enough of the macro to create the calendar in a new sheet and highligh

相关标签:
1条回答
  • 2021-01-27 23:56

    Get rid of .Select and append the new cell to the original value of Q16.

    If cell.Interior.ColorIndex = 6 Then
        Sheets("sheet1").Cells(16, "Q") = Sheets("sheet1").Cells(16, "Q").Value & Chr(10) & cell.value
    End If
    
    0 讨论(0)
提交回复
热议问题