Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default INDEX, VLOOKUP? What's best for this situation?

Ok, heres a simplified version of what I'm trying to do... At the top of the
worksheet the user enters the name of the subject in C1, selects gender from
a drop-down in C2, then selects age from a drop-down in C3. They then answer
a serious of questions (answers selected from drop-downs) and number values
are assigned and totaled based on those answers (I've got that part). Here's
where I'm stuck: when they get to the question of "Sugar Intake" (A10), they
select from a drop-down in B10 (choices are No, Mild, Moderate, Heavy).

Sheet 1 is as follows:
--------------------------------------------
Name: John Smith
Gender: Male
Age: 7

Academics 3.5-3.9 50

Activity High 15

Sugar Intake Mild 12
-----------------------------------------------------

Once they have selected the level of sugar intake, a number will appear in
C10 based on the formula in C10, which currently looks like this:
=IF(C2="Male",INDEX(Sugar!$B$5:D$14,MATCH(C3,Sugar !$A$5:$A$14,0),MATCH(B11,Sugar!$B$3:$D$3,0)))

This formula works so far and brings the correct number into C10 based on
the chart on the "Sugar" tab, which has a specific number assigned based on
age, gender, and level of sugar intake.

Sugar (Sheet 2):
--------------------------------------------------
Age/Sex Mild Moderate Heavy
Male
5 10 12 15
6 11 13 16
7 12 14 17
8 13 15 18
9 14 16 19
10 15 17 20
11 16 18 21
12 17 19 22
13 18 20 23
14 19 21 24

Female
5 9 10 14
6 10 11 15
7 11 12 16
8 12 13 17
9 13 14 18
10 14 15 19
11 15 16 20
12 16 17 21
13 17 18 22
14 18 19 23
--------------------------------------------
I now need to fix the formula so that if "Female" is selected, it will pull
in the correct figure from the Sugar tab based on the female data (B17:D26).
Also, if "no" is selected on sheet1, B10, or if the age selected is out of
the age range covered by the Sugar table, I need "0" to display in C10
instead of "#N/A", which is what appears now.

Should the formula use VLOOKUP instead of INDEX? Any advice on the best way
to handle this would be greatly appreciated. I am a novice, learning on the
fly, and don't understand the syntax of these formulas very well. Thanks in
advance for any and all assistance.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default INDEX, VLOOKUP? What's best for this situation?

Once solution, would be to set up a little differently. The only thing you
need to do on the Sugar tab is name the 2 tables. Highlight the selected
region for each. Assuming your male data starts with age 5 in A2, and the 14
in D11 (for age 14 heavy intake). So highlight from A2:D11 and name it
SugarM. Do the same for the Female table and call it SugarF.
Then, your formula would be:
=IF(OR(C2="",B10=""),"",IF(OR(C3<5,C314,B10="No") ,0,VLOOKUP(C3,INDIRECT("Sugar"&LEFT(C2,1)),INDEX(M ATCH(B10,Sugar!$A$1:$D$1,0),0),FALSE)))

Now, that being said, I noticed your 2 tables were rather small, and very
linear. You have a age range of 10, and a base line for each age/sugart
intake level. They go up 1 for every year, so, if this is accurate table
(vice a sample table), you could even do away with the table. If that
interests you, let me know, I can work up the formula.
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"charliedog" wrote:

Ok, heres a simplified version of what I'm trying to do... At the top of the
worksheet the user enters the name of the subject in C1, selects gender from
a drop-down in C2, then selects age from a drop-down in C3. They then answer
a serious of questions (answers selected from drop-downs) and number values
are assigned and totaled based on those answers (I've got that part). Here's
where I'm stuck: when they get to the question of "Sugar Intake" (A10), they
select from a drop-down in B10 (choices are No, Mild, Moderate, Heavy).

Sheet 1 is as follows:
--------------------------------------------
Name: John Smith
Gender: Male
Age: 7

Academics 3.5-3.9 50

Activity High 15

Sugar Intake Mild 12
-----------------------------------------------------

Once they have selected the level of sugar intake, a number will appear in
C10 based on the formula in C10, which currently looks like this:
=IF(C2="Male",INDEX(Sugar!$B$5:D$14,MATCH(C3,Sugar !$A$5:$A$14,0),MATCH(B11,Sugar!$B$3:$D$3,0)))

This formula works so far and brings the correct number into C10 based on
the chart on the "Sugar" tab, which has a specific number assigned based on
age, gender, and level of sugar intake.

Sugar (Sheet 2):
--------------------------------------------------
Age/Sex Mild Moderate Heavy
Male
5 10 12 15
6 11 13 16
7 12 14 17
8 13 15 18
9 14 16 19
10 15 17 20
11 16 18 21
12 17 19 22
13 18 20 23
14 19 21 24

Female
5 9 10 14
6 10 11 15
7 11 12 16
8 12 13 17
9 13 14 18
10 14 15 19
11 15 16 20
12 16 17 21
13 17 18 22
14 18 19 23
--------------------------------------------
I now need to fix the formula so that if "Female" is selected, it will pull
in the correct figure from the Sugar tab based on the female data (B17:D26).
Also, if "no" is selected on sheet1, B10, or if the age selected is out of
the age range covered by the Sugar table, I need "0" to display in C10
instead of "#N/A", which is what appears now.

Should the formula use VLOOKUP instead of INDEX? Any advice on the best way
to handle this would be greatly appreciated. I am a novice, learning on the
fly, and don't understand the syntax of these formulas very well. Thanks in
advance for any and all assistance.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default INDEX, VLOOKUP? What's best for this situation?

You use only one argument in the IF statement, so you can add a second
argument (the "ELSE" argument) "IF(C2="Female", ....")

"charliedog" schreef in bericht
...
Ok, here's a simplified version of what I'm trying to do... At the top of
the
worksheet the user enters the name of the subject in C1, selects gender
from
a drop-down in C2, then selects age from a drop-down in C3. They then
answer
a serious of questions (answers selected from drop-downs) and number
values
are assigned and totaled based on those answers (I've got that part).
Here's
where I'm stuck: when they get to the question of "Sugar Intake" (A10),
they
select from a drop-down in B10 (choices are No, Mild, Moderate, Heavy).

Sheet 1 is as follows:
--------------------------------------------
Name: John Smith
Gender: Male
Age: 7

Academics 3.5-3.9 50

Activity High 15

Sugar Intake Mild 12
-----------------------------------------------------

Once they have selected the level of sugar intake, a number will appear in
C10 based on the formula in C10, which currently looks like this:
=IF(C2="Male",INDEX(Sugar!$B$5:D$14,MATCH(C3,Sugar !$A$5:$A$14,0),MATCH(B11,Sugar!$B$3:$D$3,0)))

This formula works so far and brings the correct number into C10 based on
the chart on the "Sugar" tab, which has a specific number assigned based
on
age, gender, and level of sugar intake.

Sugar (Sheet 2):
--------------------------------------------------
Age/Sex Mild Moderate Heavy
Male
5 10 12 15
6 11 13 16
7 12 14 17
8 13 15 18
9 14 16 19
10 15 17 20
11 16 18 21
12 17 19 22
13 18 20 23
14 19 21 24

Female
5 9 10 14
6 10 11 15
7 11 12 16
8 12 13 17
9 13 14 18
10 14 15 19
11 15 16 20
12 16 17 21
13 17 18 22
14 18 19 23
--------------------------------------------
I now need to fix the formula so that if "Female" is selected, it will
pull
in the correct figure from the Sugar tab based on the female data
(B17:D26).
Also, if "no" is selected on sheet1, B10, or if the age selected is out of
the age range covered by the Sugar table, I need "0" to display in C10
instead of "#N/A", which is what appears now.

Should the formula use VLOOKUP instead of INDEX? Any advice on the best
way
to handle this would be greatly appreciated. I am a novice, learning on
the
fly, and don't understand the syntax of these formulas very well. Thanks
in
advance for any and all assistance.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default INDEX, VLOOKUP? What's best for this situation?

So close! Using the formula you provided, when I make my selections (e.g.,
"Male" in C2, "10" in C3, and "Moderate" in B10, it shows a 15 in C10, but if
you look at the Sugar table where it's pulling the data, it should be 17. It
seems to be pulling the data from the column to the left, so select "heavy"
and get moderate values, select "moderate" and get mild values, and so on.

Also, to answer your other question, no these are not real values. I decided
to "dumb it down" to simplify. Thanks for the help thus far. Almost there...

"John C" wrote:

Once solution, would be to set up a little differently. The only thing you
need to do on the Sugar tab is name the 2 tables. Highlight the selected
region for each. Assuming your male data starts with age 5 in A2, and the 14
in D11 (for age 14 heavy intake). So highlight from A2:D11 and name it
SugarM. Do the same for the Female table and call it SugarF.
Then, your formula would be:
=IF(OR(C2="",B10=""),"",IF(OR(C3<5,C314,B10="No") ,0,VLOOKUP(C3,INDIRECT("Sugar"&LEFT(C2,1)),INDEX(M ATCH(B10,Sugar!$A$1:$D$1,0),0),FALSE)))

Now, that being said, I noticed your 2 tables were rather small, and very
linear. You have a age range of 10, and a base line for each age/sugart
intake level. They go up 1 for every year, so, if this is accurate table
(vice a sample table), you could even do away with the table. If that
interests you, let me know, I can work up the formula.
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"charliedog" wrote:

Ok, heres a simplified version of what I'm trying to do... At the top of the
worksheet the user enters the name of the subject in C1, selects gender from
a drop-down in C2, then selects age from a drop-down in C3. They then answer
a serious of questions (answers selected from drop-downs) and number values
are assigned and totaled based on those answers (I've got that part). Here's
where I'm stuck: when they get to the question of "Sugar Intake" (A10), they
select from a drop-down in B10 (choices are No, Mild, Moderate, Heavy).

Sheet 1 is as follows:
--------------------------------------------
Name: John Smith
Gender: Male
Age: 7

Academics 3.5-3.9 50

Activity High 15

Sugar Intake Mild 12
-----------------------------------------------------

Once they have selected the level of sugar intake, a number will appear in
C10 based on the formula in C10, which currently looks like this:
=IF(C2="Male",INDEX(Sugar!$B$5:D$14,MATCH(C3,Sugar !$A$5:$A$14,0),MATCH(B11,Sugar!$B$3:$D$3,0)))

This formula works so far and brings the correct number into C10 based on
the chart on the "Sugar" tab, which has a specific number assigned based on
age, gender, and level of sugar intake.

Sugar (Sheet 2):
--------------------------------------------------
Age/Sex Mild Moderate Heavy
Male
5 10 12 15
6 11 13 16
7 12 14 17
8 13 15 18
9 14 16 19
10 15 17 20
11 16 18 21
12 17 19 22
13 18 20 23
14 19 21 24

Female
5 9 10 14
6 10 11 15
7 11 12 16
8 12 13 17
9 13 14 18
10 14 15 19
11 15 16 20
12 16 17 21
13 17 18 22
14 18 19 23
--------------------------------------------
I now need to fix the formula so that if "Female" is selected, it will pull
in the correct figure from the Sugar tab based on the female data (B17:D26).
Also, if "no" is selected on sheet1, B10, or if the age selected is out of
the age range covered by the Sugar table, I need "0" to display in C10
instead of "#N/A", which is what appears now.

Should the formula use VLOOKUP instead of INDEX? Any advice on the best way
to handle this would be greatly appreciated. I am a novice, learning on the
fly, and don't understand the syntax of these formulas very well. Thanks in
advance for any and all assistance.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default INDEX, VLOOKUP? What's best for this situation?

Thanks for the suggestion, but I'm not sure what you mean. Is there any way
you could give me the whole formula? I have trouble understanding the syntax
of these formulas and I'm not understanding quite where I would put that
argument, and the precise "punctuation" of it.

"Erik Veldkamp" wrote:

You use only one argument in the IF statement, so you can add a second
argument (the "ELSE" argument) "IF(C2="Female", ....")

"charliedog" schreef in bericht
...
Ok, here's a simplified version of what I'm trying to do... At the top of
the
worksheet the user enters the name of the subject in C1, selects gender
from
a drop-down in C2, then selects age from a drop-down in C3. They then
answer
a serious of questions (answers selected from drop-downs) and number
values
are assigned and totaled based on those answers (I've got that part).
Here's
where I'm stuck: when they get to the question of "Sugar Intake" (A10),
they
select from a drop-down in B10 (choices are No, Mild, Moderate, Heavy).

Sheet 1 is as follows:
--------------------------------------------
Name: John Smith
Gender: Male
Age: 7

Academics 3.5-3.9 50

Activity High 15

Sugar Intake Mild 12
-----------------------------------------------------

Once they have selected the level of sugar intake, a number will appear in
C10 based on the formula in C10, which currently looks like this:
=IF(C2="Male",INDEX(Sugar!$B$5:D$14,MATCH(C3,Sugar !$A$5:$A$14,0),MATCH(B11,Sugar!$B$3:$D$3,0)))

This formula works so far and brings the correct number into C10 based on
the chart on the "Sugar" tab, which has a specific number assigned based
on
age, gender, and level of sugar intake.

Sugar (Sheet 2):
--------------------------------------------------
Age/Sex Mild Moderate Heavy
Male
5 10 12 15
6 11 13 16
7 12 14 17
8 13 15 18
9 14 16 19
10 15 17 20
11 16 18 21
12 17 19 22
13 18 20 23
14 19 21 24

Female
5 9 10 14
6 10 11 15
7 11 12 16
8 12 13 17
9 13 14 18
10 14 15 19
11 15 16 20
12 16 17 21
13 17 18 22
14 18 19 23
--------------------------------------------
I now need to fix the formula so that if "Female" is selected, it will
pull
in the correct figure from the Sugar tab based on the female data
(B17:D26).
Also, if "no" is selected on sheet1, B10, or if the age selected is out of
the age range covered by the Sugar table, I need "0" to display in C10
instead of "#N/A", which is what appears now.

Should the formula use VLOOKUP instead of INDEX? Any advice on the best
way
to handle this would be greatly appreciated. I am a novice, learning on
the
fly, and don't understand the syntax of these formulas very well. Thanks
in
advance for any and all assistance.






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default INDEX, VLOOKUP? What's best for this situation?

Can you post your formula? Copy it from excel, then paste. For me,
Male:Moderate:10 = 17, not 15.
--
** John C **

"charliedog" wrote:

So close! Using the formula you provided, when I make my selections (e.g.,
"Male" in C2, "10" in C3, and "Moderate" in B10, it shows a 15 in C10, but if
you look at the Sugar table where it's pulling the data, it should be 17. It
seems to be pulling the data from the column to the left, so select "heavy"
and get moderate values, select "moderate" and get mild values, and so on.

Also, to answer your other question, no these are not real values. I decided
to "dumb it down" to simplify. Thanks for the help thus far. Almost there...

"John C" wrote:

Once solution, would be to set up a little differently. The only thing you
need to do on the Sugar tab is name the 2 tables. Highlight the selected
region for each. Assuming your male data starts with age 5 in A2, and the 14
in D11 (for age 14 heavy intake). So highlight from A2:D11 and name it
SugarM. Do the same for the Female table and call it SugarF.
Then, your formula would be:
=IF(OR(C2="",B10=""),"",IF(OR(C3<5,C314,B10="No") ,0,VLOOKUP(C3,INDIRECT("Sugar"&LEFT(C2,1)),INDEX(M ATCH(B10,Sugar!$A$1:$D$1,0),0),FALSE)))

Now, that being said, I noticed your 2 tables were rather small, and very
linear. You have a age range of 10, and a base line for each age/sugart
intake level. They go up 1 for every year, so, if this is accurate table
(vice a sample table), you could even do away with the table. If that
interests you, let me know, I can work up the formula.
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"charliedog" wrote:

Ok, heres a simplified version of what I'm trying to do... At the top of the
worksheet the user enters the name of the subject in C1, selects gender from
a drop-down in C2, then selects age from a drop-down in C3. They then answer
a serious of questions (answers selected from drop-downs) and number values
are assigned and totaled based on those answers (I've got that part). Here's
where I'm stuck: when they get to the question of "Sugar Intake" (A10), they
select from a drop-down in B10 (choices are No, Mild, Moderate, Heavy).

Sheet 1 is as follows:
--------------------------------------------
Name: John Smith
Gender: Male
Age: 7

Academics 3.5-3.9 50

Activity High 15

Sugar Intake Mild 12
-----------------------------------------------------

Once they have selected the level of sugar intake, a number will appear in
C10 based on the formula in C10, which currently looks like this:
=IF(C2="Male",INDEX(Sugar!$B$5:D$14,MATCH(C3,Sugar !$A$5:$A$14,0),MATCH(B11,Sugar!$B$3:$D$3,0)))

This formula works so far and brings the correct number into C10 based on
the chart on the "Sugar" tab, which has a specific number assigned based on
age, gender, and level of sugar intake.

Sugar (Sheet 2):
--------------------------------------------------
Age/Sex Mild Moderate Heavy
Male
5 10 12 15
6 11 13 16
7 12 14 17
8 13 15 18
9 14 16 19
10 15 17 20
11 16 18 21
12 17 19 22
13 18 20 23
14 19 21 24

Female
5 9 10 14
6 10 11 15
7 11 12 16
8 12 13 17
9 13 14 18
10 14 15 19
11 15 16 20
12 16 17 21
13 17 18 22
14 18 19 23
--------------------------------------------
I now need to fix the formula so that if "Female" is selected, it will pull
in the correct figure from the Sugar tab based on the female data (B17:D26).
Also, if "no" is selected on sheet1, B10, or if the age selected is out of
the age range covered by the Sugar table, I need "0" to display in C10
instead of "#N/A", which is what appears now.

Should the formula use VLOOKUP instead of INDEX? Any advice on the best way
to handle this would be greatly appreciated. I am a novice, learning on the
fly, and don't understand the syntax of these formulas very well. Thanks in
advance for any and all assistance.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default INDEX, VLOOKUP? What's best for this situation?

John, Disregard my previous note, it was my error when I changed the
reference cells. It's working great. You are a GENIUS! Many thanks.

"John C" wrote:

Once solution, would be to set up a little differently. The only thing you
need to do on the Sugar tab is name the 2 tables. Highlight the selected
region for each. Assuming your male data starts with age 5 in A2, and the 14
in D11 (for age 14 heavy intake). So highlight from A2:D11 and name it
SugarM. Do the same for the Female table and call it SugarF.
Then, your formula would be:
=IF(OR(C2="",B10=""),"",IF(OR(C3<5,C314,B10="No") ,0,VLOOKUP(C3,INDIRECT("Sugar"&LEFT(C2,1)),INDEX(M ATCH(B10,Sugar!$A$1:$D$1,0),0),FALSE)))

Now, that being said, I noticed your 2 tables were rather small, and very
linear. You have a age range of 10, and a base line for each age/sugart
intake level. They go up 1 for every year, so, if this is accurate table
(vice a sample table), you could even do away with the table. If that
interests you, let me know, I can work up the formula.
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"charliedog" wrote:

Ok, heres a simplified version of what I'm trying to do... At the top of the
worksheet the user enters the name of the subject in C1, selects gender from
a drop-down in C2, then selects age from a drop-down in C3. They then answer
a serious of questions (answers selected from drop-downs) and number values
are assigned and totaled based on those answers (I've got that part). Here's
where I'm stuck: when they get to the question of "Sugar Intake" (A10), they
select from a drop-down in B10 (choices are No, Mild, Moderate, Heavy).

Sheet 1 is as follows:
--------------------------------------------
Name: John Smith
Gender: Male
Age: 7

Academics 3.5-3.9 50

Activity High 15

Sugar Intake Mild 12
-----------------------------------------------------

Once they have selected the level of sugar intake, a number will appear in
C10 based on the formula in C10, which currently looks like this:
=IF(C2="Male",INDEX(Sugar!$B$5:D$14,MATCH(C3,Sugar !$A$5:$A$14,0),MATCH(B11,Sugar!$B$3:$D$3,0)))

This formula works so far and brings the correct number into C10 based on
the chart on the "Sugar" tab, which has a specific number assigned based on
age, gender, and level of sugar intake.

Sugar (Sheet 2):
--------------------------------------------------
Age/Sex Mild Moderate Heavy
Male
5 10 12 15
6 11 13 16
7 12 14 17
8 13 15 18
9 14 16 19
10 15 17 20
11 16 18 21
12 17 19 22
13 18 20 23
14 19 21 24

Female
5 9 10 14
6 10 11 15
7 11 12 16
8 12 13 17
9 13 14 18
10 14 15 19
11 15 16 20
12 16 17 21
13 17 18 22
14 18 19 23
--------------------------------------------
I now need to fix the formula so that if "Female" is selected, it will pull
in the correct figure from the Sugar tab based on the female data (B17:D26).
Also, if "no" is selected on sheet1, B10, or if the age selected is out of
the age range covered by the Sugar table, I need "0" to display in C10
instead of "#N/A", which is what appears now.

Should the formula use VLOOKUP instead of INDEX? Any advice on the best way
to handle this would be greatly appreciated. I am a novice, learning on the
fly, and don't understand the syntax of these formulas very well. Thanks in
advance for any and all assistance.

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default INDEX, VLOOKUP? What's best for this situation?

Genius? Nope. But I appreciate the feedback :)
--
** John C **

"charliedog" wrote:

John, Disregard my previous note, it was my error when I changed the
reference cells. It's working great. You are a GENIUS! Many thanks.

"John C" wrote:

Once solution, would be to set up a little differently. The only thing you
need to do on the Sugar tab is name the 2 tables. Highlight the selected
region for each. Assuming your male data starts with age 5 in A2, and the 14
in D11 (for age 14 heavy intake). So highlight from A2:D11 and name it
SugarM. Do the same for the Female table and call it SugarF.
Then, your formula would be:
=IF(OR(C2="",B10=""),"",IF(OR(C3<5,C314,B10="No") ,0,VLOOKUP(C3,INDIRECT("Sugar"&LEFT(C2,1)),INDEX(M ATCH(B10,Sugar!$A$1:$D$1,0),0),FALSE)))

Now, that being said, I noticed your 2 tables were rather small, and very
linear. You have a age range of 10, and a base line for each age/sugart
intake level. They go up 1 for every year, so, if this is accurate table
(vice a sample table), you could even do away with the table. If that
interests you, let me know, I can work up the formula.
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"charliedog" wrote:

Ok, heres a simplified version of what I'm trying to do... At the top of the
worksheet the user enters the name of the subject in C1, selects gender from
a drop-down in C2, then selects age from a drop-down in C3. They then answer
a serious of questions (answers selected from drop-downs) and number values
are assigned and totaled based on those answers (I've got that part). Here's
where I'm stuck: when they get to the question of "Sugar Intake" (A10), they
select from a drop-down in B10 (choices are No, Mild, Moderate, Heavy).

Sheet 1 is as follows:
--------------------------------------------
Name: John Smith
Gender: Male
Age: 7

Academics 3.5-3.9 50

Activity High 15

Sugar Intake Mild 12
-----------------------------------------------------

Once they have selected the level of sugar intake, a number will appear in
C10 based on the formula in C10, which currently looks like this:
=IF(C2="Male",INDEX(Sugar!$B$5:D$14,MATCH(C3,Sugar !$A$5:$A$14,0),MATCH(B11,Sugar!$B$3:$D$3,0)))

This formula works so far and brings the correct number into C10 based on
the chart on the "Sugar" tab, which has a specific number assigned based on
age, gender, and level of sugar intake.

Sugar (Sheet 2):
--------------------------------------------------
Age/Sex Mild Moderate Heavy
Male
5 10 12 15
6 11 13 16
7 12 14 17
8 13 15 18
9 14 16 19
10 15 17 20
11 16 18 21
12 17 19 22
13 18 20 23
14 19 21 24

Female
5 9 10 14
6 10 11 15
7 11 12 16
8 12 13 17
9 13 14 18
10 14 15 19
11 15 16 20
12 16 17 21
13 17 18 22
14 18 19 23
--------------------------------------------
I now need to fix the formula so that if "Female" is selected, it will pull
in the correct figure from the Sugar tab based on the female data (B17:D26).
Also, if "no" is selected on sheet1, B10, or if the age selected is out of
the age range covered by the Sugar table, I need "0" to display in C10
instead of "#N/A", which is what appears now.

Should the formula use VLOOKUP instead of INDEX? Any advice on the best way
to handle this would be greatly appreciated. I am a novice, learning on the
fly, and don't understand the syntax of these formulas very well. Thanks in
advance for any and all assistance.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLOOKUP or maybe INDEX mpenkala Excel Worksheet Functions 2 April 19th 08 05:05 AM
Should I use VLOOKUP? IF? INDEX? Susan Excel Worksheet Functions 4 March 13th 08 02:02 PM
VLOOKUP, INDEX, or ....? Mac Excel Worksheet Functions 1 October 15th 07 12:54 PM
INDEX? VLOOKUP? lloydyleg11 Excel Discussion (Misc queries) 2 November 14th 06 04:35 AM
Vlookup or Index/Match Scorpvin Excel Discussion (Misc queries) 2 May 16th 06 07:16 PM


All times are GMT +1. The time now is 07:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"