Vanexcel
New Member
- Joined
- Oct 22, 2021
- Messages
- 2
- Office Version
- 365
- 2019
- 2010
- Platform
- Windows
- Mobile
- Web
Column F:
i have used drop-down list and below code to get two values in one cell, >>>>>>>
Private Sub Worksheet_Change(ByVal Target As Range)
'Updated by Extendoffice 2019/11/13
Dim xRng As Range
Dim xValue1 As String
Dim xValue2 As String
If Target.Count > 1 Then Exit Sub
On Error Resume Next
Set xRng = Cells.SpecialCells(xlCellTypeAllValidation)
If xRng Is Nothing Then Exit Sub
Application.EnableEvents = False
If Not Application.Intersect(Target, xRng) Is Nothing Then
xValue2 = Target.Value
Application.Undo
xValue1 = Target.Value
Target.Value = xValue2
If xValue1 <> "" Then
If xValue2 <> "" Then
If xValue1 = xValue2 Or _
InStr(1, xValue1, ", " & xValue2) Or _
InStr(1, xValue1, xValue2 & ",") Then
Target.Value = xValue1
Else
Target.Value = xValue1 & ", " & xValue2
End If
End If
End If
End If
Application.EnableEvents = True
End Sub
>>>>>> but once the column G select more than one value, column H can't Vlookup those values
Column G is using simple indirect
=INDIRECT($F3)
Column H
=VLOOKUP([@Category],Table2[[Cat]:[Ref]],2,TRUE)
below attached FYI,
Amber table named 1-10 for each column
Green table for column G indirect but every time only available to recognize one value
i.e.
FM can locate details under FM in column G in Green
FM, ADM can't locate any details under table Green
Please help...