ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   IF Function (https://www.excelbanter.com/excel-discussion-misc-queries/168454-if-function.html)

Cateyes0122

IF Function
 
I am trying to figure out how to be able to enter a number from 1 to 43 (i.e.
C1 i type 10)in a column and have the formula in D1 with a condition if the
number in C1 matches the same number in a range name on a different sheet put
what is in the next cell (i.e. I have a chart on another sheet, so in A1 if
have the number 10 and in B1 I have the word "Sam" I want Sam to put put in
D1 where the formulas is ) This must be possible. Need major help

WLMPilot

IF Function
 

If I understand you correction, you want to input a number in C1. Based on
the value in C1, you want a value to be placed in D1. The chart has numbers
in column A and names in column B.

If this is the case then place the following formula in D1:

=LOOKUP(C1,Chart!A1:A50,Chart!B1:B50)

This formula assumes the name of the worksheet the chart is on to be Chart
and that there are 50 rows of data. Adjust both accordingly.

Les




"Cateyes0122" wrote:

I am trying to figure out how to be able to enter a number from 1 to 43 (i.e.
C1 i type 10)in a column and have the formula in D1 with a condition if the
number in C1 matches the same number in a range name on a different sheet put
what is in the next cell (i.e. I have a chart on another sheet, so in A1 if
have the number 10 and in B1 I have the word "Sam" I want Sam to put put in
D1 where the formulas is ) This must be possible. Need major help


Jean-Guy

IF Function
 
Hi,

You might want to try a VLOOKUP function, something like this:

=VLOOKUP(A1,Sheet2!$A$1:$B$100,2,0)
and in case a value is not found you can add an error trap to the formula:

=IF(ISERROR(VLOOKUP(A1,Sheet2!$A$1:$B$100,2,0)),"N ot
found",VLOOKUP(A1,Sheet2!$A$1:$B$100,2,0))

type what you want to return inside the quotes in case a value is not found,
usually people will either use the double quotes alone "" or 0.

HTH
Jean-Guy

"Cateyes0122" wrote:

I am trying to figure out how to be able to enter a number from 1 to 43 (i.e.
C1 i type 10)in a column and have the formula in D1 with a condition if the
number in C1 matches the same number in a range name on a different sheet put
what is in the next cell (i.e. I have a chart on another sheet, so in A1 if
have the number 10 and in B1 I have the word "Sam" I want Sam to put put in
D1 where the formulas is ) This must be possible. Need major help


Cateyes0122

IF Function
 
Thank you so much that worked. I am now trying to take the same type of
table, numbers in column A and names in column B on a second sheet. In F5 i
am wanting to reference the result i just used from the Vlookup which is a
name(in column B) and need to put the number in column A. Can maybe you help
with this also.

Thanks ever so much


"Jean-Guy" wrote:

Hi,

You might want to try a VLOOKUP function, something like this:

=VLOOKUP(A1,Sheet2!$A$1:$B$100,2,0)
and in case a value is not found you can add an error trap to the formula:

=IF(ISERROR(VLOOKUP(A1,Sheet2!$A$1:$B$100,2,0)),"N ot
found",VLOOKUP(A1,Sheet2!$A$1:$B$100,2,0))

type what you want to return inside the quotes in case a value is not found,
usually people will either use the double quotes alone "" or 0.

HTH
Jean-Guy

"Cateyes0122" wrote:

I am trying to figure out how to be able to enter a number from 1 to 43 (i.e.
C1 i type 10)in a column and have the formula in D1 with a condition if the
number in C1 matches the same number in a range name on a different sheet put
what is in the next cell (i.e. I have a chart on another sheet, so in A1 if
have the number 10 and in B1 I have the word "Sam" I want Sam to put put in
D1 where the formulas is ) This must be possible. Need major help


Jean-Guy

IF Function
 
Hi,

For that you can use a combination of INDEX and MATCH:

=INDEX(Sheet2!$A$1:$A$100,MATCH(F5,Sheet2!$B$1:$B$ 100))

HTH
Jean-Guy

"Cateyes0122" wrote:

Thank you so much that worked. I am now trying to take the same type of
table, numbers in column A and names in column B on a second sheet. In F5 i
am wanting to reference the result i just used from the Vlookup which is a
name(in column B) and need to put the number in column A. Can maybe you help
with this also.

Thanks ever so much


"Jean-Guy" wrote:

Hi,

You might want to try a VLOOKUP function, something like this:

=VLOOKUP(A1,Sheet2!$A$1:$B$100,2,0)
and in case a value is not found you can add an error trap to the formula:

=IF(ISERROR(VLOOKUP(A1,Sheet2!$A$1:$B$100,2,0)),"N ot
found",VLOOKUP(A1,Sheet2!$A$1:$B$100,2,0))

type what you want to return inside the quotes in case a value is not found,
usually people will either use the double quotes alone "" or 0.

HTH
Jean-Guy

"Cateyes0122" wrote:

I am trying to figure out how to be able to enter a number from 1 to 43 (i.e.
C1 i type 10)in a column and have the formula in D1 with a condition if the
number in C1 matches the same number in a range name on a different sheet put
what is in the next cell (i.e. I have a chart on another sheet, so in A1 if
have the number 10 and in B1 I have the word "Sam" I want Sam to put put in
D1 where the formulas is ) This must be possible. Need major help



All times are GMT +1. The time now is 07:03 PM.

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