+ Reply to Thread
Results 1 to 6 of 6

macro for 14 boolean variables

  1. #1
    Registered User
    Join Date
    07-15-2014
    Location
    Spalding UK
    MS-Off Ver
    2013
    Posts
    3

    macro for 14 boolean variables

    Hi everybody new to using macro's don't know if this is possible or where to start.

    I want to build a macro to evaluate the Boolean state of fourteen Boolean variables.

    The combinations mathematically is 2*2*2*2*2*2*2*2*2*2*2*2*2*2 = 16384 combinations

    How ever I then want to produce bit patterns for the above combinations only where a valid bit pattern is.

    The variables are broken into relational pairs, there fore 7 pairs.


    For simplicity in explaining the valid patterns I will only use two of the variables



    variable 1 variable7

    true true ok

    true false ok

    false false ok

    false true not valid



    The bit pattern result would only display valid patterns of the summed variable pairs in the following order

    (variable1 , variable2 , variable3 , variable4 , variable5 , variable6 , variable7 , variable8 , variable9 , variable10 , variable11 , variable12 , variable13 , variable14)

    Any help or advice on how to do this would be greatly appreciated.

    I looked at some of the routines on other posts but cannot find a routine that purely produces combinations for 14 Boolean variables

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,036

    Re: macro for 14 boolean variables

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Never use Merged Cells in Excel

  3. #3
    Registered User
    Join Date
    07-15-2014
    Location
    Spalding UK
    MS-Off Ver
    2013
    Posts
    3

    Re: macro for 14 boolean variables

    Hi the upload manager appears not to be working every time I try to upload the work book to attach or insert a screen shot the upload manager just sits there busy

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,036

    Re: macro for 14 boolean variables

    When you click Add files try Basic uploader

  5. #5
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: macro for 14 boolean variables

    you could do

    Please Login or Register  to view this content.

    I havent tested in Excel.

    You could even do functions for it, so say fnXOR(blnVar1,vlnVar2),fnOR(blnVar1,vlnVar2),fnXNOR(blnVar1,vlnVar2 as string) etc
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  6. #6
    Registered User
    Join Date
    07-15-2014
    Location
    Spalding UK
    MS-Off Ver
    2013
    Posts
    3

    Re: macro for 14 boolean variables

    Hi attached workbook showing data output format with bit patterns produced from conditioning
    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. Macro To Copy Row Based On Boolean?
    By ViralSynergy in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-28-2012, 07:04 PM
  2. Need some advice in Boolean variables
    By Jdash99 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-30-2010, 11:24 AM
  3. 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
  4. [SOLVED] turns it all red, not just if boolean is true -- help with macro
    By Nicole Seibert in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-06-2006, 09:25 AM
  5. how can I insert a macro into a boolean statement
    By Garrett in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-29-2005, 11:50 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