ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Syntax for using "IF"... (https://www.excelbanter.com/excel-worksheet-functions/59229-syntax-using-if.html)

garry05

Syntax for using "IF"...
 

Trying to resolve a situation that I've got posted elsewhere on here;
maybe I can do it this way if someone can help me with the syntax for
using "IF".

Say that column G is numbered 1-5, and column H has values of 100, 133,
322, 440, 560.

I'll enter a number (1-5) in col A, and I want this to happen in col B,
and I'll express it in human language: If A2=3 then B2=322...If A1=5
then B1=560.

In other words, I post a number in A, then go search G for the same
number, then post the corresponding H value into B.

I've tried the syntax every way but the right way, I guess.


Thanks,
Garry


--
garry05


Syntax for using "IF"...
 
Hi

It sounds like you already have a 'table' structure set up in cols G and H.
Try this in col B2:
=VLOOKUP(A2,G:H,2,FALSE)

Andy.


"garry05" wrote in message
...

Trying to resolve a situation that I've got posted elsewhere on here;
maybe I can do it this way if someone can help me with the syntax for
using "IF".

Say that column G is numbered 1-5, and column H has values of 100, 133,
322, 440, 560.

I'll enter a number (1-5) in col A, and I want this to happen in col B,
and I'll express it in human language: If A2=3 then B2=322...If A1=5
then B1=560.

In other words, I post a number in A, then go search G for the same
number, then post the corresponding H value into B.

I've tried the syntax every way but the right way, I guess.


Thanks,
Garry


--
garry05





All times are GMT +1. The time now is 11:32 PM.

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