Hello,
I hope the following code snippet helps you,
A = {'AB' '2300' 'J' '1500'
'BC' '992' 'J' '2300'};
in = input('Enter Input\n','s');
out = A(find(strcmp(A,in)),end);
The "strcmp" function is used to find the location of the string matching the input and then logical indexing is performed to get the desired output.