ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   question using "INDEX" and "IF" functions (https://www.excelbanter.com/excel-worksheet-functions/192485-question-using-index-if-functions.html)

monkeytrader

question using "INDEX" and "IF" functions
 
i have 2 columns of data which correspond together. the cell in column "A"
and the cell in column "B" are pairs of data. i want to be able to lookup the
two columns and print out the corresponding "match" into another cell.

ex:

A B C D
1 5 20 4 30
2 4 30 2 50
3 3 40 5 20
4 2 50
4 1 60

columns "A" and "B" are the data. columns "C" and "D" show what i want to
make a function for.

is it possible to write a function in column "D" to show that when column
"C" has the number "4" in it, then it prints "30" in the cell from the data
pulled from columns "A" and "B"? (in column "A", 1=60. 2=50. 3=40, etc)

sorry for the vagueness. appreciate your help in advance!




Bob Phillips[_3_]

question using "INDEX" and "IF" functions
 
=VLOOKUP(C1,A1:B5,2,False)

--
__________________________________
HTH

Bob

"monkeytrader" wrote in message
...
i have 2 columns of data which correspond together. the cell in column "A"
and the cell in column "B" are pairs of data. i want to be able to lookup
the
two columns and print out the corresponding "match" into another cell.

ex:

A B C D
1 5 20 4 30
2 4 30 2 50
3 3 40 5 20
4 2 50
4 1 60

columns "A" and "B" are the data. columns "C" and "D" show what i want to
make a function for.

is it possible to write a function in column "D" to show that when column
"C" has the number "4" in it, then it prints "30" in the cell from the
data
pulled from columns "A" and "B"? (in column "A", 1=60. 2=50. 3=40, etc)

sorry for the vagueness. appreciate your help in advance!







All times are GMT +1. The time now is 01:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com