+ Reply to Thread
Results 1 to 1 of 1

Nest Boolean logic into CHOOSE function

  1. #1
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Nest Boolean logic into CHOOSE function

    Here is an example how to use BIN2DEC function to create criteria for CHOOSE function.
    I find it usefull and didn't see it before so if it's already explained somewhere please take mine excuse.

    In this example I take 3 option. That will give me 2^3 = 8 combinations.

    Idea is to have 3 colors (RED, BLUE, YELLOW) and then choose them by YES/NO (Y/N) to create different pallete (not visually, just words).

    So here is 8 combinations:

    Please Login or Register  to view this content.
    In following example I'll take BLUE and YELLOW while RED will remain N and Y/N options are in G column.
    Please Login or Register  to view this content.
    Idea is to convert each of them into 0/1 and join them together.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    So above table can be interpreted as:
    Please Login or Register  to view this content.
    Where those 8 combinations are actually binary numbers.
    So if we convert BIN2DEC:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Above values will be converted from 0 to 7.

    Since index number of CHOOSE function is starting from 1 need to add +1 to get proper criteria:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Value can be anything. Text, formula... And you need to define each of them.

    For example:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Of course, this can be achieved with other approach. This is just example how to use BIN2DEC function in some other way.
    Attached Files Attached Files

+ 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. Boolean logic to process lists for Venn diagrams
    By pkin in forum Excel General
    Replies: 0
    Last Post: 02-19-2013, 05:01 PM
  2. Autofilter on two columns with boolean logic...
    By tlew in forum Excel General
    Replies: 3
    Last Post: 10-01-2009, 04:38 PM
  3. Boolean Logic Question
    By Lost Ninja in forum Excel General
    Replies: 3
    Last Post: 03-26-2009, 12:44 PM
  4. Deleting rows of data the with use of boolean logic.
    By Ben Morton in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-24-2009, 10:47 AM
  5. [SOLVED] Anyone know how to format cells as yes/no boolean logic?
    By JethroUK© in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 07-19-2005, 01: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