Hello,
I am attempting to do a calculation in Excel and I am not sure how to
proceed. The idea is the following:
if cell A2 equals a specific word (text), like quot;Adultquot;, then I want it to
grab cell B2 which is a % and put it into cell A3. However, there can be up
to four quot;wordsquot; and depending on which word is in the cell, it needs to grab
a different cell with a different % in it and put THAT into another cell.
For example - A2 equals quot;Adultquot;, cell B2 equals 100%, I want cell A3 to
equal 100%.
Cell B2 needs to be able to be change to any %...
The final cell is then a part of another formula.
Thanks
in cell A3:
=IF(A2=quot;Adultquot;,B2,IF(A2=quot;word2quot;,B3,IF(A2=quot;word3quot;,F 12,IF(A2=quot;word4quot;,N12))))
quot;Hickeymquot; wrote:
gt; Hello,
gt; I am attempting to do a calculation in Excel and I am not sure how to
gt; proceed. The idea is the following:
gt;
gt; if cell A2 equals a specific word (text), like quot;Adultquot;, then I want it to
gt; grab cell B2 which is a % and put it into cell A3. However, there can be up
gt; to four quot;wordsquot; and depending on which word is in the cell, it needs to grab
gt; a different cell with a different % in it and put THAT into another cell.
gt;
gt; For example - A2 equals quot;Adultquot;, cell B2 equals 100%, I want cell A3 to
gt; equal 100%.
gt; Cell B2 needs to be able to be change to any %...
gt;
gt; The final cell is then a part of another formula.
gt;
gt; Thanks
You can quot;nestquot; IF Statement inside of other IF Statements. For example:
=IF(A2=quot;Adultquot;,B2,IF(A2=quot;Childquot;,B3,IF(A2=quot;Seniorquot;, B4,B5)))
This formula will check A2.
IF A2 = quot;Adultquot; then pull value of B2
IF A2 = quot;Childquot; then pull value of B3
IF A2 = quot;Seniorquot; then pull value of B4
Otherwise, pull value of B5
Does that help?
Elkar
quot;Hickeymquot; wrote:
gt; Hello,
gt; I am attempting to do a calculation in Excel and I am not sure how to
gt; proceed. The idea is the following:
gt;
gt; if cell A2 equals a specific word (text), like quot;Adultquot;, then I want it to
gt; grab cell B2 which is a % and put it into cell A3. However, there can be up
gt; to four quot;wordsquot; and depending on which word is in the cell, it needs to grab
gt; a different cell with a different % in it and put THAT into another cell.
gt;
gt; For example - A2 equals quot;Adultquot;, cell B2 equals 100%, I want cell A3 to
gt; equal 100%.
gt; Cell B2 needs to be able to be change to any %...
gt;
gt; The final cell is then a part of another formula.
gt;
gt; Thanks
=IF(A2=quot;adultquot;,B2,IF(A2=quot;childquot;,C2,IF(A2=quot;grandpaquot; ,D2,E2)))
But much better would be to use the VLOOKUP() function.
See this nice introduction:
www.contextures.com/xlFunctions02.html
--
Kind regards,
Niek Otten
quot;Hickeymquot; gt; wrote in message ...
| Hello,
| I am attempting to do a calculation in Excel and I am not sure how to
| proceed. The idea is the following:
|
| if cell A2 equals a specific word (text), like quot;Adultquot;, then I want it to
| grab cell B2 which is a % and put it into cell A3. However, there can be up
| to four quot;wordsquot; and depending on which word is in the cell, it needs to grab
| a different cell with a different % in it and put THAT into another cell.
|
| For example - A2 equals quot;Adultquot;, cell B2 equals 100%, I want cell A3 to
| equal 100%.
| Cell B2 needs to be able to be change to any %...
|
| The final cell is then a part of another formula.
|
| Thanks
- Dec 18 Thu 2008 20:48
If then statements?
close
全站熱搜
留言列表
發表留言
留言列表

