So l have a 2 column table, with the first column being size, and the next column being weight. I want to create an input where I get a user to type in the object size, and the next cell just spits out the corresponding weight. Is there anyway to do this in excel?
size weight
1 12
2 15
3 20
For example given the table above I want a user to just type in '2' for size, and an output cell will spit out '15'.
So far I've tried using structured table references, but they only refer to columns? I don't know how to get it to associate a size with the weight in the cell right beside it.
There isn't a formula I can use either that takes the size of the object and spits out the weight either, because the values come from a numerical solution that the scientific paper I'm looking at doesn't specify.
CodePudding user response:
You can use vlookup
like so:
=VLOOKUP(D1,A:B,2,0)
User enters the size in D1 and D2 spits out the weight.
CodePudding user response:
Try just LOOKUP()
Function
• Formula used in cell E2
=LOOKUP(E1,A2:B4)