简体   繁体   中英

How do I populate a cell based on its value from a range?

Hello,

Please forgive me if I didn't word my question very well. However, I have an excel spreadsheet that I must complete and submit to our headquarters on a monthly basis. I've been manually editing most of the fields but I think there's a way to automate some of the values. Unfortunately, I haven't figured it out yet so I thought I'd seek help here.

So I have two tables (Table1 and Table2) - images below. What I need is a way to automatically populate the RATE FACTOR (Column D) if the WEIGHT (Column C) falls within a certain range (defined in table2).

I was reading on here about using VLOOKUP, but couldn't get it to work. Any assistance would be appreciated, thanks.

IMAGES BELOW (had trouble attaching images to question).

Table 1: https://dl.dropbox.com/u/55292384/table1.jpg

Table 2: https://dl.dropbox.com/u/55292384/table2.jpg

//Kismet

Assuming that your example has the titles in row 1, in cell D2 enter =VLOOKUP(C2,$G$2:$H$17,2)

You can copy this formula to the other cells in column D.

VLOOKUP demands that the table of values is sorted in ascending order by the first column. The lookup value (here C2) is found in the first column and the 2 says to return the corresponding value in the second column. By default if the lookup value is not found, VLOOKUP returns the result corresponding to the nearest value less than the lookup value. This may or may not suit your rate factor calculation (if not, I can make an additional suggestion).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM