Alphaboss7
New Member
- Joined
- Jul 31, 2017
- Messages
- 28
Hi Guys,
I know this may be simple, but for the life of me I cannot get this to work. I'm trying to just simply use VBA to lookup values based on a specific cell value.
This specific cell has a drop down list, so depending on the value, the data being pulled will come from different sheets that have identical layouts. I just wanted to use the following code as a pattern to see if I could get it to work based on one value from the dropdown list.
So I would just replicate the code and use "Network" instead of "SysAdmin" when the specific cell range "Team_DrpDn" changes to that value.
Let me know if that's not enough clarification.
Thanks,
AB7
I know this may be simple, but for the life of me I cannot get this to work. I'm trying to just simply use VBA to lookup values based on a specific cell value.
This specific cell has a drop down list, so depending on the value, the data being pulled will come from different sheets that have identical layouts. I just wanted to use the following code as a pattern to see if I could get it to work based on one value from the dropdown list.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("Team_DrpDn") = "SysAdmin" Then
For i = 27 To 30
Range("G" & i).Value = Application.WorksheetFunction.VLookup(Range("E" & i).Value, Sheets("SysAd Historical").Range("E10:G13").Select, 3, False)
Next i
End If
End Sub
So I would just replicate the code and use "Network" instead of "SysAdmin" when the specific cell range "Team_DrpDn" changes to that value.
Let me know if that's not enough clarification.
Thanks,
AB7