is there any way to use vlookup or index and match functions in Excel exclude the entire row which has lookup value in the table array in VB.NET?
For example: I have a table array like
101 2 200 500
102 5 200 450
103 3 200 750
101 2 200 450
103 5 200 500
lookup value :103 (A3)
table array:A1:D5
column:4 (500)
For example I am looking for 103 (ie A3 cell value) in the table array. I want D5 cell value. But I am getting the D3 cells value (ie the row itself): 750 instead of 500 in the 5th row. So I want to exclude the look up value of that row while searching. Is it possible? Please guide me.
i have a lot of rows with data in Excel sheet. so i am directly using vlookup with for loop. This is my code:
For ii As Integer = 0 To i20 - 1
bmatint(ii, 0) = "=VLOOKUP( " & "B" & ii + 2 & " ,B2:R15000,1,FALSE)"
bmatint(ii, 1) = "=VLOOKUP( " & "B" & ii + 2 & " ,B2:R15000,16,FALSE)"
bmatint(ii, 2) = "=VLOOKUP( " & "B" & ii + 2 & " ,B2:R15000,17,FALSE)"
bmatint(ii, 3) = "=VLOOKUP( " & "I" & ii + 2 & " ,B2:R15000,1,FALSE)"
bmatint(ii, 4) = "=VLOOKUP( " & "I" & ii + 2 & " ,B2:R15000,16,FALSE)"
bmatint(ii, 5) = "=VLOOKUP( " & "I" & ii + 2 & " ,B2:R15000,17,FALSE)"
Next
it gives wrong results as i explained above.
gvg