+ Reply to Thread
Results 1 to 10 of 10

entering a Boolean value into a cell

  1. #1
    Forum Contributor
    Join Date
    06-29-2016
    Location
    Bristol, England
    MS-Off Ver
    2007
    Posts
    355

    entering a Boolean value into a cell

    Hi, I want a cell to contain, and show, a logical True or False value, so that I can test it elsewhere with a simple IF(A1) .....

    I've Googled around a bit, but am getting confused (brain like cabbage).

    What is the simplest way of entering a simple True / False value into a cell please.

    Thanks as always

    K

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: entering a Boolean value into a cell

    TRUE and FALSE

    or

    1 and 0

  3. #3
    Forum Contributor
    Join Date
    06-29-2016
    Location
    Bristol, England
    MS-Off Ver
    2007
    Posts
    355

    Re: entering a Boolean value into a cell

    just as text ?, in a general format ?

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: entering a Boolean value into a cell

    Quote Originally Posted by Trebor777 View Post
    just as text ?, in a general format ?
    General format, yes.

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: entering a Boolean value into a cell

    If that's an 'OR' request and you mean that you want a cell to show either a True or a False then self evidently that cell needs to contain a formula that returns either a True or False.

    e.g. for say A1:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    will return a True if B1 is > C1 or False if not.

    But if you then want to use A1 as the subject of a test, why not instead just use the formula that is in A1?
    It seems to me that you don't actually need an A1 cell.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  6. #6
    Forum Contributor
    Join Date
    06-29-2016
    Location
    Bristol, England
    MS-Off Ver
    2007
    Posts
    355

    Re: entering a Boolean value into a cell

    Richard thanks, but there is no formula in A1, it is an input cell.

  7. #7
    Forum Contributor
    Join Date
    06-29-2016
    Location
    Bristol, England
    MS-Off Ver
    2007
    Posts
    355

    Re: entering a Boolean value into a cell

    Quote Originally Posted by 63falcondude View Post
    TRUE and FALSE

    or

    1 and 0




    Deep respect, this works! I am surprised I couldn't find it on Mr Google. mega-thanks. K

  8. #8
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: entering a Boolean value into a cell

    Quote Originally Posted by Trebor777 View Post
    Deep respect, this works! I am surprised I couldn't find it on Mr Google. mega-thanks. K
    You're welcome. Glad to help.

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: entering a Boolean value into a cell

    Quote Originally Posted by Trebor777 View Post
    Richard thanks, but there is no formula in A1, it is an input cell.
    In this forum when you haven't given a specific reference to a cell we tend to use A1 as a default. This is a fairly common practice.
    So when you said 'I want a cell' without saying which it is then I used the general convention and used A1 as an example Since you're obviously talking about another cell then just substitute that one in my example.

    I'm still somewhat puzzled though since just entering TRUE or FALSE in a cell is setting that cell as a Constant value. It will never change (unless of course you change it manually), so there seems little point in using it for testing with another cell.

  10. #10
    Forum Contributor
    Join Date
    06-29-2016
    Location
    Bristol, England
    MS-Off Ver
    2007
    Posts
    355

    Re: entering a Boolean value into a cell

    Richard A1 is fine. The reason I want to enter a logical TRUE into a cell is complex. You may be amused by my next question which might help. Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 05-07-2017, 05:05 PM
  2. [SOLVED] Exit Workbook_BeforeClose(Cancel As Boolean) if a public boolean = true
    By meabrams in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-20-2016, 06:10 AM
  3. Replies: 0
    Last Post: 01-29-2013, 04:59 PM
  4. Change cell value if Boolean is true
    By English_Bloke82 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-18-2013, 07:18 AM
  5. Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) problem
    By 2funny4words in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-29-2009, 07:28 PM
  6. Boolean comparison: range vs. single cell
    By msimms in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-11-2006, 08:55 PM
  7. [SOLVED] Using boolean function for color fill:get color cell
    By Kanchi in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1