Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to refer to cells in a table based off a row value in Excel?

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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.

>Solution :

You can use vlookup like so:

=VLOOKUP(D1,A:B,2,0)

User enters the size in D1 and D2 spits out the weight.

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading