ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Run out of nested Ifs (https://www.excelbanter.com/excel-worksheet-functions/82430-run-out-nested-ifs.html)

Clive Williamson

Run out of nested Ifs
 
Please can someone advise about the following problem.

I have a spreadsheet with 2 columns each with parallel data to which other
cells need to refer eg

1 1.5
2 2.7
3 2.9
4 3.1
5 3.5
6 3.8
7 4.1
8 5.2
9 6.3
10 7.3

I also have a data entry cell where I can enter numbers from 1 to 10, and a
result cell which needs a formula which automatically returns the data from
column on the right to match that on the left. To put it simply, if I enter
a 2 into the data cell I want to see 2.7 in the result cell; if I enter 7, I
want to see a result of 4.1

I've managed to do this with a complicated set of nested IF calculations,
but these run out at 7 nests, so I can't do this for all 10 sets of data.

Is there a way of doing this?

Thanks

Clive


Bob Phillips

Run out of nested Ifs
 
=VLOOKUP(A1,{1,1.5;2,2.7;3,2.9;4,3.1;5,3.5;6,3.8;7 ,4.1;8,5.2;9,6.3;10,7.3},2
,FALSE)

or put the values in a table and refer to that.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Clive Williamson" wrote in message
...
Please can someone advise about the following problem.

I have a spreadsheet with 2 columns each with parallel data to which other
cells need to refer eg

1 1.5
2 2.7
3 2.9
4 3.1
5 3.5
6 3.8
7 4.1
8 5.2
9 6.3
10 7.3

I also have a data entry cell where I can enter numbers from 1 to 10, and

a
result cell which needs a formula which automatically returns the data

from
column on the right to match that on the left. To put it simply, if I

enter
a 2 into the data cell I want to see 2.7 in the result cell; if I enter 7,

I
want to see a result of 4.1

I've managed to do this with a complicated set of nested IF calculations,
but these run out at 7 nests, so I can't do this for all 10 sets of data.

Is there a way of doing this?

Thanks

Clive




Ashish Mathur

Run out of nested Ifs
 
Hi,

Try this

=vlookup(input cell,reference range,2)

Regards,

Ashish Mathur

"Clive Williamson" wrote:

Please can someone advise about the following problem.

I have a spreadsheet with 2 columns each with parallel data to which other
cells need to refer eg

1 1.5
2 2.7
3 2.9
4 3.1
5 3.5
6 3.8
7 4.1
8 5.2
9 6.3
10 7.3

I also have a data entry cell where I can enter numbers from 1 to 10, and a
result cell which needs a formula which automatically returns the data from
column on the right to match that on the left. To put it simply, if I enter
a 2 into the data cell I want to see 2.7 in the result cell; if I enter 7, I
want to see a result of 4.1

I've managed to do this with a complicated set of nested IF calculations,
but these run out at 7 nests, so I can't do this for all 10 sets of data.

Is there a way of doing this?

Thanks

Clive



Clive Williamson

Run out of nested Ifs
 
Thanks. That really seems to work fine. One refinement though: is it
possible to use cell references instead of the 1.5, 2.7 series of numbers? I
can't seem to get that working, and it would solve all of my problems at
once!

Thanks again

Clive


On 10/4/06 10:25, in article , "Bob
Phillips" wrote:

=VLOOKUP(A1,{1,1.5;2,2.7;3,2.9;4,3.1;5,3.5;6,3.8;7 ,4.1;8,5.2;9,6.3;10,7.3},2
,FALSE)

or put the values in a table and refer to that.




Clive Williamson

Run out of nested Ifs
 

Thanks Bob. This really works well. As a refinement, is it possible to use
cell references within the formula instead of the 1.5, 2.7 series of
numbers? That would really sort things out for me!

Clive

On 10/4/06 10:25, in article , "Bob
Phillips" wrote:

=VLOOKUP(A1,{1,1.5;2,2.7;3,2.9;4,3.1;5,3.5;6,3.8;7 ,4.1;8,5.2;9,6.3;10,7.3},2
,FALSE)

or put the values in a table and refer to that.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Clive Williamson" wrote in message
...
Please can someone advise about the following problem.

I have a spreadsheet with 2 columns each with parallel data to which other
cells need to refer eg

1 1.5
2 2.7
3 2.9
4 3.1
5 3.5
6 3.8
7 4.1
8 5.2
9 6.3
10 7.3

I also have a data entry cell where I can enter numbers from 1 to 10, and

a
result cell which needs a formula which automatically returns the data

from
column on the right to match that on the left. To put it simply, if I

enter
a 2 into the data cell I want to see 2.7 in the result cell; if I enter 7,

I
want to see a result of 4.1

I've managed to do this with a complicated set of nested IF calculations,
but these run out at 7 nests, so I can't do this for all 10 sets of data.

Is there a way of doing this?

Thanks

Clive






Gary''s Student

Run out of nested Ifs
 
=CHOOSE(A1,1.5,2.7,2.9,3.1,3.5,3.8,4.1,5.2,6.3,7.3 )
--
Gary''s Student


"Clive Williamson" wrote:

Please can someone advise about the following problem.

I have a spreadsheet with 2 columns each with parallel data to which other
cells need to refer eg

1 1.5
2 2.7
3 2.9
4 3.1
5 3.5
6 3.8
7 4.1
8 5.2
9 6.3
10 7.3

I also have a data entry cell where I can enter numbers from 1 to 10, and a
result cell which needs a formula which automatically returns the data from
column on the right to match that on the left. To put it simply, if I enter
a 2 into the data cell I want to see 2.7 in the result cell; if I enter 7, I
want to see a result of 4.1

I've managed to do this with a complicated set of nested IF calculations,
but these run out at 7 nests, so I can't do this for all 10 sets of data.

Is there a way of doing this?

Thanks

Clive



Bob Phillips

Run out of nested Ifs
 
Yes, create a table very simple to the example you posted in say M1:N20 and
use

=VLOOKUP(1,$M$1:$N$20,2,False)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Clive Williamson" wrote in message
...

Thanks Bob. This really works well. As a refinement, is it possible to use
cell references within the formula instead of the 1.5, 2.7 series of
numbers? That would really sort things out for me!

Clive

On 10/4/06 10:25, in article , "Bob
Phillips" wrote:


=VLOOKUP(A1,{1,1.5;2,2.7;3,2.9;4,3.1;5,3.5;6,3.8;7 ,4.1;8,5.2;9,6.3;10,7.3},2
,FALSE)

or put the values in a table and refer to that.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Clive Williamson" wrote in message
...
Please can someone advise about the following problem.

I have a spreadsheet with 2 columns each with parallel data to which

other
cells need to refer eg

1 1.5
2 2.7
3 2.9
4 3.1
5 3.5
6 3.8
7 4.1
8 5.2
9 6.3
10 7.3

I also have a data entry cell where I can enter numbers from 1 to 10,

and
a
result cell which needs a formula which automatically returns the data

from
column on the right to match that on the left. To put it simply, if I

enter
a 2 into the data cell I want to see 2.7 in the result cell; if I enter

7,
I
want to see a result of 4.1

I've managed to do this with a complicated set of nested IF

calculations,
but these run out at 7 nests, so I can't do this for all 10 sets of

data.

Is there a way of doing this?

Thanks

Clive








Clive Williamson

Run out of nested Ifs
 
On 10/4/06 11:41, in article , "Bob
Phillips" wrote:

Yes, create a table very simple to the example you posted in say M1:N20 and
use

=VLOOKUP(1,$M$1:$N$20,2,False)




BINGO! Many thanks Bob, you've saved me a lot of aggravation!

Clive


Arvi Laanemets

Run out of nested Ifs
 
Hi


=CHOOSE(YourNumber,$B:$B)
, where YourNumber is a number or cell reference to one. This formula
assumes, that there is no header row in lookup table. When the 1st row
contains headers, the formula will be
=CHOOSE(YourNumber+1,$B:$B)



--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )


"Clive Williamson" wrote in message
...
Please can someone advise about the following problem.

I have a spreadsheet with 2 columns each with parallel data to which other
cells need to refer eg

1 1.5
2 2.7
3 2.9
4 3.1
5 3.5
6 3.8
7 4.1
8 5.2
9 6.3
10 7.3

I also have a data entry cell where I can enter numbers from 1 to 10, and
a
result cell which needs a formula which automatically returns the data
from
column on the right to match that on the left. To put it simply, if I
enter
a 2 into the data cell I want to see 2.7 in the result cell; if I enter 7,
I
want to see a result of 4.1

I've managed to do this with a complicated set of nested IF calculations,
but these run out at 7 nests, so I can't do this for all 10 sets of data.

Is there a way of doing this?

Thanks

Clive





All times are GMT +1. The time now is 10:39 PM.

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