How to copy a dropdown menu (data validation) to entire column in Excel (only rows that having something else too). And, in this case, how to leave row for the header?
Instead of clicking in a cell, click on the header (A,B,C, etc) and go to: Data Tools > Data validation.
Example
Ok, I found the answer and now it's working:
Sub pasteCellToColumn()
Dim lastRow As Long, i As Long
lastRow = Sheets("Sheet1").Cells(Rows.Count, 2).End(xlUp).Row
Sheets("hiddenData").Range("A1").Copy
For i = 1 To lastRow
If Len(Trim(Sheets("Sheet1").Range("A" & i).Value)) <> 0 Then
Sheets("Sheet1").Range("K" & i).PasteSpecial _
Paste:=xlPasteValidation
End If
Next i
End Sub
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With