# Help with VLookup

#### barc0d3guy

##### New member
Hi there, I am trying to model a game system on excel to help my team. In the attached workbook on sheet 3, I have altitude and their corresponding temperatures. On B1 and B2, I have Types of Weather and Time of day respectively. On the right I have a table with Type of Weather and the decrease in temperature in Day and Night, on the listed weather type. I want to be able to select, the Types of weather from B1 and Time of Day from B2 and decrease/increase the temperature according to the table on the right.

I tried using, IF(AND) statements to make this work, but i got an error, stating "too many arguments". I wonder if, I could use Vlookup for this, but i am not really sure how it will work with vlookup. Is there anyway I can make this work?

#### Attachments

• dynamic weatherv1.1.xlsx
12.4 KB · Views: 12

#### NBVC

##### Super Moderator
Staff member
Try:

=-20+INDEX(\$I\$13:\$J\$20,MATCH(\$B\$1,\$H\$13:\$H\$20,0),MATCH(\$B\$2,\$I\$12:\$J\$12,0))

then in next cell

=B7-1

copied down (to subtract a degree)

#### barc0d3guy

##### New member
Try:

=-20+INDEX(\$I\$13:\$J\$20,MATCH(\$B\$1,\$H\$13:\$H\$20,0),MATCH(\$B\$2,\$I\$12:\$J\$12,0))

then in next cell

=B7-1

copied down (to subtract a degree)

thnx, that helps