Option Explicit
Sub MakeValidationList()
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Sheet1")
Dim dataRange As Range
Set dataRange = ws.Range("A1:A3,C1:C3")
Dim dataList As String
Dim entry As Variant
For Each entry In dataRange
dataList = dataList & entry.Value & ","
Next entry
'--- remove the last trailing comma
dataList = Left$(dataList, Len(dataList) - 1)
Dim dropDownCell As Range
Set dropDownCell = ws.Range("B3:B10")
dropDownCell.Validation.Delete
dropDownCell.Validation.Add Type:=xlValidateList, _
AlertStyle:=xlValidAlertStop, _
Formula1:=dataList
End Sub
from the data above, how can the datavalidation range be taken from sheet2, because it works for sheet1 (the same sheet)? request the learning