+ Reply to Thread
Results 1 to 7 of 7

I can't make what I want to happen, happen.

  1. #1
    Registered User
    Join Date
    01-15-2007
    Posts
    28

    Question I can't make what I want to happen, happen.

    I have attached the spreadsheet I am working on called Tree Sample Form. In this Excel spreadsheet, I have three worksheets. One is called "Tree Data"; the second, "Bark_Cone_Leaves"; and finally "Summary".
    In the "Tree Data" worksheet I want to mark off which species I have in a sample. Then on the "Summary" I want the descriptions of cone, bark, and leaves to appear beside the species.
    I can make all of this happen, but on the "Summary" worksheet, any species I have not marked off in the "Tree Data" shows up as "#N/A". I don't want this. In fact I want no space between the different species in a sample.
    Please look at my attached example and HELP!!!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    The simplest solution would be to just AutoFilter the Summary sheet. Place your cell in the table, then select Data > Filter > AutoFilter from the menu. Then for column A, select NonBlanks.

    The only down side is that each time you change your tree selections, you would have to reselect NonBlanks to have the proper results on your Summary sheet.

  3. #3
    Registered User
    Join Date
    01-15-2007
    Posts
    28

    Question This is closer to what I want....

    The AutoFilter does what I want, but I am still wondering if there is a way to make it happen automatically and instantly when I fill in the data in the "Tree Data"?

    Also, can a person make a formula respond to a "Check Box"?. For example, if the check box is checked can a formula return the value of 1?

  4. #4
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    This should accomplish what you need hopefully.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-15-2007
    Posts
    28

    How did you make the macro?

    I think you made a macro to autofilter the Summary page. How did you make that?

  6. #6
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    You are correct. I made a couple of changes to the spreadsheet.

    First, I incorporated the use of check boxes, rather than using an "X", per your above request. The way I did this was create a check box, then right-click and select Properties. From the properties menu, you can change the title of the check box (which I did for each tree). You can also link it to a cell. What this does is for example, in check box 1, it is linked to cell C2. If the box is checked, C2 = TRUE. Otherwise C2 = FALSE. Then I slightly modified your formulas in column B to incorporate TRUE and FALSE, rather than "X" or "".

    Then I used the following macro for the Summary sheet:

    Please Login or Register  to view this content.
    What this code does is that every time you activate (select) this sheet, it will perform the above steps. It will select cell A1 and then autofilter the selection based on nonblanks. You can view the code by right-clicking on the 'Summary' tab and select view code.

    By the way, there are a lot of macros that you can "record" yourself if you do not know the proper language. That's how I taught myself (not including all the wonderful help on this site!). From the menu, select Tools > Macro > Record, then perform your tasks, and click the stop button. You can then view the code you just "recorded" with ALT + F11.
    Last edited by jasoncw; 01-16-2007 at 12:47 PM.

  7. #7
    Registered User
    Join Date
    01-15-2007
    Posts
    28

    Smile Thanks

    This has been great information. Thank you for your help.

+ 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