Hi Rami,
I'm asuming that "i need when i input x and 1, to index 20" means that when you enter "x" in one cell and "1" in another, the formula is to return the value in C3 (shown as 20 in the example, but could be text in the general case.
One way to do it is to create a single column containing an unique identifier for each row, then constructing a search value to match from the two separate inputs.
In the Lookup table (your sample table above), that will require either replacing columns a and b with a single column containing the combined values, or adding a column where the combined value is constructed from the values i the two columns. The second method is shown below.
In the example below, I've also added a second column to the lookup table to demonstrate that this method will also work with text values in the results column (c).
Lookup 2 is your sample table. x and y entries are in column B, 123 entries in column C.
Column D (labeled 'ab') contains the formula below, which concatenates the contents of cells in columns B and C into a singe, unique text string.
Formula in Lookup 2::D2, and filled down: =B&C
Column E (labeled 'c') contains the values to be returned, taken from your sample table.
Column F contains an alternate set of text values as a demonstration that this method may be used with either numeric or text values.
In the table on the left, named 'Main,' the two part code is entered into columns B and C (labeled 'a' and 'b' respectively). The formula in column D (labeled 'c') combines the two parts into a single search value, then looks up that value in the first column (D) of the actual lookup table (columns D and E of Lookup 2), and returns the associated value from column E:
Formula in Main::D2, and filled down:
D2, and filled down: =VLOOKUP(B&C,Lookup 2 :: $D:$E,2,0)
Column E of Main contains a formula with three revisions:
The lookup table has bee enlarged to include a third column (F)
The value returned comes from the third column of the lookup table (3)
The VLOOKUP formula has been enclosed in an IF statement to replace the spurious zeroes that occur where they occur in the version above with a fixed text value ("-") and suppresses calculation of the 'correct' value until entries of both parts of the code have been made.
E2, and filled down: =IF(AND(LEN(B)>0,LEN(C)>0),VLOOKUP(B&C,Lookup 2 :: $D:$F,3,0),"-")
Regards,
Barry