Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Hickeym
 
Posts: n/a
Default If then statements?

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 "Adult", then I want it to
grab cell B2 which is a % and put it into cell A3. However, there can be up
to four "words" 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 "Adult", 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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Umlas, Excel MVP
 
Posts: n/a
Default If then statements?

in cell A3:
=IF(A2="Adult",B2,IF(A2="word2",B3,IF(A2="word3",F 12,IF(A2="word4",N12))))

"Hickeym" wrote:

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 "Adult", then I want it to
grab cell B2 which is a % and put it into cell A3. However, there can be up
to four "words" 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 "Adult", 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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Elkar
 
Posts: n/a
Default If then statements?

You can "nest" IF Statement inside of other IF Statements. For example:

=IF(A2="Adult",B2,IF(A2="Child",B3,IF(A2="Senior", B4,B5)))

This formula will check A2.
IF A2 = "Adult" then pull value of B2
IF A2 = "Child" then pull value of B3
IF A2 = "Senior" then pull value of B4
Otherwise, pull value of B5

Does that help?
Elkar

"Hickeym" wrote:

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 "Adult", then I want it to
grab cell B2 which is a % and put it into cell A3. However, there can be up
to four "words" 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 "Adult", 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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Niek Otten
 
Posts: n/a
Default If then statements?

=IF(A2="adult",B2,IF(A2="child",C2,IF(A2="grandpa" ,D2,E2)))

But much better would be to use the VLOOKUP() function.

See this nice introduction:

http://www.contextures.com/xlFunctions02.html

--
Kind regards,

Niek Otten

"Hickeym" 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 "Adult", then I want it to
| grab cell B2 which is a % and put it into cell A3. However, there can be up
| to four "words" 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 "Adult", 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


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
Excel MS Query multiple select statements Revenger Excel Discussion (Misc queries) 3 May 12th 06 12:32 PM
UDFunctions and nested If-the-else statements JDB Excel Worksheet Functions 1 January 25th 06 03:29 PM
Linking two IF statements together trixma Excel Discussion (Misc queries) 2 September 29th 05 06:07 AM
Better Way to Code IF Statements? TheRobsterUK Excel Discussion (Misc queries) 4 July 18th 05 03:37 PM
Nested IF statements John Simons Excel Worksheet Functions 14 February 16th 05 06:17 AM


All times are GMT +1. The time now is 08:01 PM.

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"