Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-11-2016, 09:05 AM
mbesspiata mbesspiata is offline Don't want if statement to return "false" Windows 7 64bit Don't want if statement to return "false" Office 2010 64bit
Advanced Beginner
Don't want if statement to return "false"
 
Join Date: Mar 2011
Location: Virginia
Posts: 57
mbesspiata is on a distinguished road
Angry Don't want if statement to return "false"

I have multiple if statements in a formula which I want the "if false" to return the value of cell instead of the work "false". How do I do that? Here is my current statement where I have categories listed in a column. I want this formula to check and if it does not equal either VEH, VES, OR AIR then it should place "GP" in the cell. I get all the "GP" showing but instead of returning the veh, ves, or air value from the cell I get the "false".

=IF(E6<>"VEH",IF(E6<>"VES",IF(E6<>"AIR","GP",E6)))

I want the value of E6 to show and not the word "false".



It's really bugging me.
Reply With Quote
  #2  
Old 05-11-2016, 12:42 PM
xor xor is offline Don't want if statement to return &quot;false&quot; Windows 10 Don't want if statement to return &quot;false&quot; Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,097
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

For instance:

=IF((E6<>"VEH")*(E6<>"VES")*(E6<>"AIR"),"GP",E6)

Your formula:
Let's say you have VES in E6, then the first argument E6<>"VEH" evaluates to TRUE so the formula now is: =IF(TRUE,IF(E6<>"VES",IF(E6<>"AIR","GP",E6)))
Then the first argument of the second IF E6<>"VES" is evaluated to FALSE and the formula is reduced to: =IF(TRUE;FALSE) which returns FALSE.

Try to use the Evaluate Formula tool on your formula and I think it will become clear.
Reply With Quote
  #3  
Old 06-06-2016, 02:29 PM
Scott Huish Scott Huish is offline Don't want if statement to return &quot;false&quot; Windows 7 32bit Don't want if statement to return &quot;false&quot; Office 2010 32bit
Novice
 
Join Date: Jun 2016
Posts: 1
Scott Huish is on a distinguished road
Default

=if(or(e6={"veh","ves","air"}),e6,"GP")
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: "Changes made were lost...reconnect with server", when switching "from" field randhurrle Outlook 2 02-25-2015 06:51 PM
How do I delete the names under "Exceptions" when I use the "Restrict Editing" feature in Word? MengS Word 0 02-25-2015 02:57 PM
remove repeated words with " macro " or " wild cards " in texts with parentheses and commas jocke321 Word VBA 2 12-10-2014 11:27 AM
Don't want if statement to return &quot;false&quot; IF statement just generates text "MERGEFIELD" in document - what am I doing wrong? Eri Mail Merge 1 03-03-2012 03:03 PM
Don't want if statement to return &quot;false&quot; How to choose a "List" for certain "Heading" from "Modify" tool? Jamal NUMAN Word 2 07-03-2011 03:11 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:50 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft