+ Reply to Thread
Results 1 to 37 of 37

Using Boolean to compile knowledge...

Hybrid View

  1. #1
    Registered User
    Join Date
    05-29-2009
    Location
    Mustang, OK
    MS-Off Ver
    Excel 2003
    Posts
    30

    Using Boolean to compile knowledge...

    First post here. "Hello!"

    I have minimal excel knowledge, but enough to get by. I have 2 years in C++ programming.

    Here's what I'm trying to do:

    I'm trying to create a workbook to keep track of flags we send out, and receive back. We have a lot going and coming, so I figured the best way to do this would be to break down each region on different sheets. But I need to create a check box that says something like, "Yes/No" or "Here/Gone" or something like that. THEN, I need to take that information, and put it on the front sheet of the workbook so I know how many we have in/out total. Does this make sense? I know how I would program this in C++, but excel is a bit different. Thank you for your time and thoughts on this.

    /Hawk
    Last edited by hawkteflon; 06-01-2009 at 02:04 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Using Boolean to compile knowledge...

    Have a read through this similar thread...

    Instead of >0 conditions to get data... use your Boolean results (=TRUE)

    http://www.excelforum.com/excel-prog...rder-list.html
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    05-29-2009
    Location
    Mustang, OK
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Using Boolean to compile knowledge...

    I went through that one, and I'm completely lost.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Using Boolean to compile knowledge...

    How can we help you then?

    What lost you?

    Where is your sample workbook showing what you have and what you want?

  5. #5
    Registered User
    Join Date
    05-29-2009
    Location
    Mustang, OK
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Using Boolean to compile knowledge...

    1.) I don't know what a VB editor is.
    2.) This, for example: =IF(E2>0,MAX($A$1:A1)+1,0)
    What is happening in this IF statement? If cell e2>0, ...? You have A dollars?

    I was hoping there was just some simple way of doing this, but after looking at the coding of that other one, I was like, "hmmm ... maybe not..."

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Using Boolean to compile knowledge...

    The VB Editor is the Visual Basic Editor... where code is entered to run macros...

    but I was indirectly referring to my solution in that post which is all formula-based on has no VBA macro involvement...

    That formula is used in a helper column to gather information.. so that the formula in the summary page knows which items to extract... so that if any of those formulas result in anything other than 0, then it is to be extracted and in that order.

    If you post a workbook example, I may possibly be able to get you started.

  7. #7
    Registered User
    Join Date
    05-29-2009
    Location
    Mustang, OK
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Using Boolean to compile knowledge...

    how do i post a workbook? Here, or another site?

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Using Boolean to compile knowledge...

    The paperclip icon in the reply box...

  9. #9
    Registered User
    Join Date
    05-29-2009
    Location
    Mustang, OK
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Using Boolean to compile knowledge...

    it's very basic ...
    Attached Files Attached Files

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Using Boolean to compile knowledge...

    see attached.

    I inserted a column in each existing sheet where I put the formula to count the number of entries with "Yes" in column B.

    Then I inserted a Summary sheet to extrapolate the data, based on the number sequence in column A.

    So as long as you put a "Yes" in column B of the sheets, it should appear on the summary sheet.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    05-29-2009
    Location
    Mustang, OK
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Using Boolean to compile knowledge...

    Wow, thank you!
    Can you explain what exactly is happening here: =IF(ISNA(VLOOKUP($A4,THREED('Africa:USA & Canada'!$A$1:$G$50),COLUMNS($B$1:C$1),0)),"",VLOOKUP($A4,THREED('Africa:USA & Canada'!$A$1:$G$50),COLUMNS($B$1:C$1),0))

    I don't understand the use of the dollar sign in excel.

    Hmm ... i just typed in "yes" on one of the columns, then went back to the summary page. It's full of "#NAME?" in every cell.

  12. #12
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Using Boolean to compile knowledge...

    I probably should have re-emphasized it here.. but you do need to install a free addin from here for it to work: Morefunc.xll

    The THREED() function is part of that addin.

    The basic workings of this function is the native Vlookup() function..

    The formula looks for the number in column A of the summary sheet in any/all of the other sheets... if it does not find it, it means we have extracted all available "Yes's" and so returns a blank.. otherwise it pulls the data corresponding to the number in column A from whatever sheet it found it in.

    The $ sign makes the cell reference absolute (i.e. "freezes" it) so that when you copy the formula down or over, the cell reference does not change... if the $ sign is not there, then the reference is relative and will change relative to where you copied it to.

  13. #13
    Registered User
    Join Date
    05-29-2009
    Location
    Mustang, OK
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Using Boolean to compile knowledge...

    Do I need to put that file anywhere in particular?

    Also, if I put this on the network for others to use later, is there a way to make sure that file is attached so they don't get errors?

  14. #14
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Using Boolean to compile knowledge...

    You just need to download and install it.. it should automatically become part of your excel forever.

    After you install the addin, go to Tools|Morefunc|Embed Morefunc in the workbook.. this will allow you to share the workbook without having to get the users to install the tool themselves.

  15. #15
    Registered User
    Join Date
    05-29-2009
    Location
    Mustang, OK
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Using Boolean to compile knowledge...

    I broke it again.

    Now it's giving me "#REF!" everywhere.

  16. #16
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Using Boolean to compile knowledge...

    Is the addin installed? Go to Tools|Addins.. it should be in the list and checked.

    Did you change, add or remove sheet names? You have to adjust formulas and the names must match exactly...

    Also if you changed the Vlookup ranges, column indexes, you have to make sure that the references are valid...

  17. #17
    Registered User
    Join Date
    05-29-2009
    Location
    Mustang, OK
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Using Boolean to compile knowledge...

    nope, i typed "yes" in one column ... Summary page went nuts. I'm restarting in hopes it will wake it up.

  18. #18
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Using Boolean to compile knowledge...

    So is the addin installed or not?

    If yes, re-attach sheet here.. I can see if you did something wrong.. perhaps.

  19. #19
    Registered User
    Join Date
    05-29-2009
    Location
    Mustang, OK
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Using Boolean to compile knowledge...

    Yes, it's installed.

    I also get a weird error when I embed the file to the workbook (if I embed the help file, too).

    EDIT: Sorry, ONLY if I embed the help file.
    Attached Files Attached Files
    Last edited by hawkteflon; 06-01-2009 at 10:53 AM.

  20. #20
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Using Boolean to compile knowledge...

    See if attached works...

    I don't know what happened.. put I just went to B1 and reactivated the cell, pressed Enter and it worked... I then copied down and across...

    I also re-embedded the Morefunc for you... I didn't get any funny errors,etc...

    hopefully it works.
    Attached Files Attached Files

  21. #21
    Registered User
    Join Date
    05-29-2009
    Location
    Mustang, OK
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Using Boolean to compile knowledge...

    Upon opening the file, I get:

    "Macros are disabled because the security level is set to High and a digitally signed Trusted Certificate is not attached to the macros."

    What level of macro security should I be using?

    EDIT: Changed to low ...

    How did you reactivate it? I went in, typed 'yes', checked summary and "#REF!"'s took over. I haven't changed ANYTHING.
    Last edited by hawkteflon; 06-01-2009 at 11:06 AM.

  22. #22
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Using Boolean to compile knowledge...

    Embedding the Morefunc.xll addin creates a macro so that is why you get the message...

    I would suggest you always set security to Medium and only approve if you trust the file you are opening...

  23. #23
    Registered User
    Join Date
    05-29-2009
    Location
    Mustang, OK
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Using Boolean to compile knowledge...

    any idea why the REF!'s are back?

  24. #24
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Using Boolean to compile knowledge...

    No, the copy I saved on my computer comes up okay after closing it and re-opening it....

    Go to cell B2 and hit F2, then hit Enter.. then copy down and across. Does that work?

    Re-save it and then re-open it.

  25. #25
    Registered User
    Join Date
    05-29-2009
    Location
    Mustang, OK
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Using Boolean to compile knowledge...

    I feel like I'm missing something easy ...

    f2 activates the fomula. Enter just drops me down to the next row. REF's are still there. When I Click a REF, it has a little yellow diamond next to it that says, "Invalid cell reference error"

    Am I supposed to have another plugin attatched or something?

    I feel like I'm wasting your time, and you must be thinking, "Seriously, man ... it's not hard." I'm officially excel dumb.

  26. #26
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Using Boolean to compile knowledge...

    Unless you are changing anything else in the file that I sent back to you, I am not sure what else would be causing that problem...

    See the attached alternative.. it doesn't use the Morefunc Addin.. but it is more complicated in that it uses a named range consisting of the names of all you data sheets.. and then it uses an array formula to extract the data... The array formula is confirmed with CTRL+SHIFT+ENTER and then copied down and across.
    Attached Files Attached Files

  27. #27
    Registered User
    Join Date
    05-29-2009
    Location
    Mustang, OK
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Using Boolean to compile knowledge...

    that one seems to work so far, but man ... i just don't understand what is happening in that formula. For the moment, I'm fine with that. Thank you for your help on this.

    Not to make this any more of a pain, but by the way it's written, can the "Sent" column be changed to Yes/No drop boxes that will still send that same information?

  28. #28
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Using Boolean to compile knowledge...

    To better understand the formula, go to a cell with the formula in it and then go to Tools|Formula Auditing|Evaluate Formula.. then click Evaluate over and over to see the steps taken to resolve the formula... This is why I went with the other solution first.. because it is easier to understand and implement if the addin would work..

    For the drop down, you need data validation..

    Pick the range of cells to apply it to and go to Data|Validation... choose List from the Allow menu and enter "yes,no" (without the quotes) in the Source field.

    Click Ok... now when you click on one of those cells, you should get the drop down choice.

  29. #29
    Registered User
    Join Date
    05-29-2009
    Location
    Mustang, OK
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Using Boolean to compile knowledge...

    Awesome! Thank you for all of your help!

    Oh, wow ... that worked much easier than the Data / List / Create List thing I was trying

  30. #30
    Registered User
    Join Date
    05-29-2009
    Location
    Mustang, OK
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Using Boolean to compile knowledge...

    Lastly, I noted that if I insert columns, it messes things up. Lets say I want to insert a new column (new D column) ... what will I need to be altering to make sure Summary isn't messed up.

  31. #31
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Using Boolean to compile knowledge...

    Quote Originally Posted by hawkteflon View Post
    Lastly, I noted that if I insert columns, it messes things up. Lets say I want to insert a new column (new D column) ... what will I need to be altering to make sure Summary isn't messed up.
    Inserted in which sheet(s)?

  32. #32
    Registered User
    Join Date
    05-29-2009
    Location
    Mustang, OK
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Using Boolean to compile knowledge...

    all of them

    well, all but summary, I guess

  33. #33
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Using Boolean to compile knowledge...

    In B2 of the Summary sheet, change the formula to this one:

    =IF(ISNA(VLOOKUP($A2,INDIRECT("'"&INDEX(Areas,MATCH(TRUE,COUNTIF(INDIRECT("'"&Areas&"'!A2:A50"),$A2)>0,0))&"'!A2:Z50"),COLUMNS(B$1),0)),"",VLOOKUP($A2,INDIRECT("'"&INDEX(Areas,MATCH(TRUE,COUNTIF(INDIRECT("'"&Areas&"'!A2:A50"),$A2)>0,0))&"'!A2:Z50"),COLUMN(B$1),0))
    hold the CTRL and SHIFT keys down and press ENTER.. You should see the { } brackets reappear... now copy over and down as far as you want...

    This will accomodate for up to 50 rows in each sheet and 26 columns in each sheet.

    When you insert new columns in the other sheets, you may need to many adjust the headings in the Summary sheet.

  34. #34
    Registered User
    Join Date
    05-29-2009
    Location
    Mustang, OK
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Using Boolean to compile knowledge...

    Brackets are already there ... that's how you sent it to me

    So what if I need it for 125 rows? Do I just need to change the G50 to G125 in all of the formulae?

    EDIT: What I need to do is add a column between sent and received. That will mess the summary page up, though

  35. #35
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Using Boolean to compile knowledge...

    The formula I added in my last post is different from the one I sent in the previous file and therefore, you need to paste the new formula in B2 and reconfirm it with the CSE keys to get it to have the { } brackets...

    Yes, you need to change G50 to G125 only in the formula in cell B2, then you need to once again confirm it with the special CSE key combination. Then you copy it across the columns and down the rows.

  36. #36
    Registered User
    Join Date
    05-29-2009
    Location
    Mustang, OK
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Using Boolean to compile knowledge...

    Ah, I see what you're saying! Wonderful! Thank you very much!

  37. #37
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Using Boolean to compile knowledge...

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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