Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
=IF AND or OR
I need some help with a formula. Here's my data:
Field F7 could be 50 or 60 (value) Field F8 could be either Y or N (meaning yes or no) If F7=50 and F8=y, then I need it to read "NA" for not applicable If F7=50 and F8=n, then I need it to read " " blank If F7=60 and F8=Y, then I need it to perform calculation of F5*F4 If F7=60 and F8=n, then I need it to read " " blank So, only when F7 is 60 and F8 is Y do I want the formula to calculate. How do I do this? I've tried =ifand statements and =ifor statements, but they all keep coming up "false". Please help! |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
=IF AND or OR
=IF(F8="n","",IF(F7=50,"NA",F5*F4))
-- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "sumif and" wrote: I need some help with a formula. Here's my data: Field F7 could be 50 or 60 (value) Field F8 could be either Y or N (meaning yes or no) If F7=50 and F8=y, then I need it to read "NA" for not applicable If F7=50 and F8=n, then I need it to read " " blank If F7=60 and F8=Y, then I need it to perform calculation of F5*F4 If F7=60 and F8=n, then I need it to read " " blank So, only when F7 is 60 and F8 is Y do I want the formula to calculate. How do I do this? I've tried =ifand statements and =ifor statements, but they all keep coming up "false". Please help! |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
=IF AND or OR
On Mon, 5 Jan 2009 12:17:01 -0800, Luke M
wrote: =IF(F8="n","",IF(F7=50,"NA",F5*F4)) If you want to accept either "n" or "N" as no, you can modify this to =IF(LOWER(F8)="n","",IF(F7=50,"NA",F5*F4)) or =IF(LOWER(F8)="n"," ",IF(F7=50,"NA",F5*F4)) if you really want " " and not "" as the "blank" result. Hope this helps / Lars-Åke |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
=IF AND or OR
BTW, XL does not actually distinguish between upper and lower case when using
IF formulas. -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "Lars-Ã…ke Aspelin" wrote: On Mon, 5 Jan 2009 12:17:01 -0800, Luke M wrote: =IF(F8="n","",IF(F7=50,"NA",F5*F4)) If you want to accept either "n" or "N" as no, you can modify this to =IF(LOWER(F8)="n","",IF(F7=50,"NA",F5*F4)) or =IF(LOWER(F8)="n"," ",IF(F7=50,"NA",F5*F4)) if you really want " " and not "" as the "blank" result. Hope this helps / Lars-Ã…ke |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
=IF AND or OR
On Mon, 5 Jan 2009 12:44:03 -0800, Luke M
wrote: BTW, XL does not actually distinguish between upper and lower case when using IF formulas. You are right. I should have checked that first. Buy how would one do if one really wanted to distinguish between upper an lower case? CODE() could be used for single letter strings, but what about longer strings? / Lars-Åke |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
=IF AND or OR
Check out the EXACT() function.
In article , Lars-Åke Aspelin wrote: On Mon, 5 Jan 2009 12:44:03 -0800, Luke M wrote: BTW, XL does not actually distinguish between upper and lower case when using IF formulas. You are right. I should have checked that first. Buy how would one do if one really wanted to distinguish between upper an lower case? CODE() could be used for single letter strings, but what about longer strings? / Lars-Åke |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
=IF AND or OR
On Mon, 05 Jan 2009 20:58:36 GMT, Lars-Åke Aspelin
wrote: On Mon, 5 Jan 2009 12:44:03 -0800, Luke M wrote: BTW, XL does not actually distinguish between upper and lower case when using IF formulas. You are right. I should have checked that first. Buy how would one do if one really wanted to distinguish between upper an lower case? CODE() could be used for single letter strings, but what about longer strings? / Lars-Åke I found it. EXACT() is the think to use in that case. / Lars-Åke |
#8
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
=IF AND or OR
Lars-Åke Aspelin wrote:
On Mon, 5 Jan 2009 12:44:03 -0800, Luke M wrote: BTW, XL does not actually distinguish between upper and lower case when using IF formulas. You are right. I should have checked that first. Buy how would one do if one really wanted to distinguish between upper an lower case? CODE() could be used for single letter strings, but what about longer strings? / Lars-Åke You would use FIND() or EXACT(). |
#9
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
=IF AND or OR
If you really have three status options, why complicate it by trying to use a y/Y/n? Why not just use a DIFFERENT 3rd flag? y/n/na or y/n/x -- JBeaucaire ------------------------------------------------------------------------ JBeaucaire's Profile: http://www.thecodecage.com/forumz/member.php?userid=73 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=46728 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|