Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-05-2024, 01:08 PM
Vladizm Vladizm is offline If return boolean Windows 11 If return boolean Office 2021
Novice
If return boolean
 
Join Date: Jun 2024
Posts: 1
Vladizm is on a distinguished road
Default If return boolean

Hi.

Is posible that IF statement returns just True o False?


if somevariable then
True


else
False
end if
Reply With Quote
  #2  
Old 06-05-2024, 11:03 PM
ArviLaanemets ArviLaanemets is offline If return boolean Windows 8 If return boolean Office 2016
Expert
 
Join Date: May 2017
Posts: 932
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default

Your current syntax assumes, that somevariable is boolean, i.e. True or False!
When this is case, simply use somevariable instead of If .. End If

When this not the case, then something like
Code:
=somevariable = SomeExpression
(where SomeExpresion may be a value, or [> something], or [Null], or [whatever]) will do.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
If return boolean Boolean data field - how to correctly handle it saltwater Mail Merge 3 11-27-2022 05:06 PM
Returning Boolean Bikram Word VBA 4 04-04-2022 07:39 PM
If return boolean Loop through Multiple Boolean Variables ScottyBee Word VBA 8 03-25-2019 03:24 PM
Return Entire Row ibrahimaa Excel 3 01-10-2012 05:44 AM
Return to in box cjwilson2740 Outlook 0 04-05-2010 02:27 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:28 PM.


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