Hi Gurus,
I need to create a drop down list in my work book. The requirement is as follows.
Sheet1 has the list of departments (which are not unique).
I need a dropdown list in sheet2 with the department list from sheet1 to be put into once cell.
I need to write a macro that will filter the duplicate records and create a sorted (ascending ) dropdownlist.
I have written this but it shows an error in the highlighted line. Further, it is not recognizing the sheet names. Variables (stvalue and i) record the range of the list in sheet 1.
Sub department()
Application.ScreenUpdating = True
Dim stvalue As String
Dim i As String
Sheets("Department").Select
Sheets("Department").Activate
stvalue = Range("f2").Value
i = Range("g4").Value
ActiveSheet.Range(stvalue, ActiveSheet.Range(i)).Copy
Sheets("depreciation report").Select
Range("f15").Paste
End Sub
Bookmarks