Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() Please forgive my ignorance, I am new to this. My question is almost identical to the previous post, but I was unable to understand that answer. My problem is that I have two ifs that need to be satisfied before returning an answer. Example: If B10="X" and A2B2 then 2*A2 If B10="X" and B2A2 then 2*B2 If B10 doesn not = "X" then 0 I know how to write the simple version =IF((B10="X"),2*A2,0) but I'm not sure where to place the extra argument or what term to use to add another one. (& or AND or whatever). I've tried them all....except the right one, apparently. Someone suggested VLOOKUP tables and I looked that up in my manual but it seems to indicate referencing a set table which this does not seem to have. Perhaps I don't understand correctly. In any event, the first scenario I mentioned is easier to understand, if I can just figure out how to include one more argument. Any ideas? Thanks so much. -- pdgood ------------------------------------------------------------------------ pdgood's Profile: http://www.excelforum.com/member.php...o&userid=31623 View this thread: http://www.excelforum.com/showthread...hreadid=516661 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
One way:
=IF(B10="X", IF(A2B2, 2*A2, 2*B2), 0) However, you could simplify that as =IF(B10="X", 2 * MAX(A2,B2), 0) And since XL coverts TRUE/FALSE values to 1/0, respectively, in math operations, you could simplify this a bit mo =(B10<"X") * 2 * MAX(A2,B2) In article , pdgood wrote: Please forgive my ignorance, I am new to this. My question is almost identical to the previous post, but I was unable to understand that answer. My problem is that I have two ifs that need to be satisfied before returning an answer. Example: If B10="X" and A2B2 then 2*A2 If B10="X" and B2A2 then 2*B2 If B10 doesn not = "X" then 0 I know how to write the simple version =IF((B10="X"),2*A2,0) but I'm not sure where to place the extra argument or what term to use to add another one. (& or AND or whatever). I've tried them all....except the right one, apparently. Someone suggested VLOOKUP tables and I looked that up in my manual but it seems to indicate referencing a set table which this does not seem to have. Perhaps I don't understand correctly. In any event, the first scenario I mentioned is easier to understand, if I can just figure out how to include one more argument. Any ideas? Thanks so much. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() You guys are amazing! And the response time in this forum is unbelieveable. Many, many thanks. -- pdgood ------------------------------------------------------------------------ pdgood's Profile: http://www.excelforum.com/member.php...o&userid=31623 View this thread: http://www.excelforum.com/showthread...hreadid=516661 |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Of course the "<" should have been "=".
In article , JE McGimpsey wrote: And since XL coverts TRUE/FALSE values to 1/0, respectively, in math operations, you could simplify this a bit mo =(B10<"X") * 2 * MAX(A2,B2) |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() I think this method will save you a step or two: =IF(B10="X",2*MAX(A2:B2),0) OR you could even go this way: =(B10="X")*MAX(A2:B2)*2 Does that help? Regards, Ron -- Ron Coderre ------------------------------------------------------------------------ Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419 View this thread: http://www.excelforum.com/showthread...hreadid=516661 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Nested IF statement | Excel Discussion (Misc queries) | |||
Nested If statement | Excel Worksheet Functions | |||
Problem with nested IF_OR statement | Excel Worksheet Functions | |||
Nested If statement | Excel Worksheet Functions | |||
7+ nested if statement? | Excel Worksheet Functions |