=IF(ISNA(MATCH(E1,B2:B4,0)),"",INDEX(A2:B4,MATCH(E1,B2:B4,0),1))Can you paste your actual formula.
It gives me 4 as answer... and changes input field from X to B?Thanks for that.
How about
Excel Formula:=IF(ISNA(MATCH("*"&E1&"*",B2:B4,0)),"",INDEX(A2:B4,MATCH("*"&E1&"*",B2:B4,0),1))
Function IndexWithComma(rng As Range, cell As String)
Dim c As Range
Dim v As Variant, n As Variant
Dim i As Long
For Each c In rng.Columns(2).Cells
v = Split(Replace(c.Cells(1).Value, Chr(10), ","), ",")
n = Split(c.Offset(, -1).Cells(1).Value, ",")
If UBound(v) = UBound(n) Then
For i = 0 To UBound(v)
If LCase(v(i)) = LCase(cell) Then
IndexWithComma = n(i)
Exit Function
End If
Next
End If
Next
IndexWithComma = ""
End Function
Dante Amor | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | Number | Variable | Variable | A | Y | m | hello | bye | z | |||
2 | 1,2,3 | X Y Z | Value | 4 | 2 | 6 | 7 | 3 | ||||
3 | 4 | A | ||||||||||
4 | 5 | B | ||||||||||
5 | 6,7 | hello bye | ||||||||||
6 | ||||||||||||
7 | ||||||||||||
8 | ||||||||||||
9 | ||||||||||||
10 | ||||||||||||
Hoja3 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E2:J2 | E2 | =IndexWithComma($A$2:$B$10,E1) |