+ Reply to Thread
Results 1 to 9 of 9

Excel 2007 : In the Shelly Cashman Series book for Excel 2007

  1. #1
    Registered User
    Join Date
    02-12-2010
    Location
    state college
    MS-Off Ver
    Excel 2007
    Posts
    6

    In the Shelly Cashman Series book for Excel 2007

    If you have the book, I'm working on the in the lab question # 3, part 3, pages 412 and 413.

    I have extracted the records based on these criteria:
    1. Gender = F, GPA = >3.50
    2. Age > 23
    3. Gender = M, Age = <21

    I'm now stuck on the part where it asks for me to extract records based on this criteria:
    21<Age<25.

    So far I have added the additional AGE column to the immediate right in my Criteria table and redefined my Criteria range in the name box. However, when I go back to the Advanced Filter dialog box and click OK, I get no results based on that criteria.

    Any help is appreciated.

  2. #2
    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: In the Shelly Cashman Series book for Excel 2007

    Hi,

    I haven't go the book but if you have an AND criteria, i.e. where the ages selected must be >21 and < 25 then you'll need a 2 x 2 criteria range with Age in two adjacent column cells with <25 in the first cell of the second row and >25 in the second cell of the second row.

    e.g.
    Please Login or Register  to view this content.
    HTH
    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.

  3. #3
    Registered User
    Join Date
    02-12-2010
    Location
    state college
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: In the Shelly Cashman Series book for Excel 2007

    So I would put the >21 in one row and the <25 in the row beneath it as my range? That right?

    I tried it that way and now instead of the whole table disappearing, the whole table stays. It still doesn't show just the 4 records.
    Last edited by shg; 02-12-2010 at 08:13 PM. Reason: deleted spurious quote

  4. #4
    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: In the Shelly Cashman Series book for Excel 2007

    Hi,

    First of all are you trying to extract the records to another range, or filtering the existing table? Your first post suggested the former, but your use of the phrase 'the whole table stays' in the latest post suggests the latter. My advice was covering the extracting to another area.

    The >21 and the <25 go on the same row both immediately under cells containing the word 'Age'. Exactly as I showed in my first post. This two by two range must be specified as the criteria range in the Data Filter Advanced Filter process.

    HTH

  5. #5
    Registered User
    Join Date
    02-12-2010
    Location
    state college
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: In the Shelly Cashman Series book for Excel 2007

    Sorry...yes I'm extracting the results from the table to another part of the book.

    I have my table with the data and above that is my Criteria area. It's my understanding based on the first 3 records I extracted that once I defined my criteria and went to the Advanced Filter dialog box and clicked OK, the data in my table would update to show only those records that met the listed criteria. I would then extract those results to another part of my workbook.

    Where I'm at now is that I can't get my data table to update with the criteria so that I can extract it. According to the book, there should be 4 results that remain after I input my criteria of 21<Age<25.

    I've attached the work I've done so far, hopefully that might help my explanation some.

  6. #6
    Registered User
    Join Date
    02-12-2010
    Location
    state college
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: In the Shelly Cashman Series book for Excel 2007

    Still stuck here...haha

  7. #7
    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: In the Shelly Cashman Series book for Excel 2007

    Hi,

    See the attached.

    The first point to make is that unless you restrict the output range to a specific range of cells you are always in danger of over-writing anything that is below your output range labels. That's why it's always a good idea to keep them away from any other data and the easiest way to do this is on an individual sheet. I've added the sheet called Output.

    In the Output sheet I have named the range E1:F2 'crit_age' and A2:H9 'DataOut'
    Your table on the first sheet already has a name called 'Table1'

    When you click the button the following macro is run.

    Please Login or Register  to view this content.
    i.e this does automatically what you can manually do through the menu Data Advanced Filter.....

    Change the criteria to see the different effects. currently with >21 and <25 it gives you four output rows.

    Since it contains a macro it's a .xlsm file rather than just a .xlsx file so you may need to accept the warning about it containing macros when youj open it. Depends how your system is set up.

    HTH

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: In the Shelly Cashman Series book for Excel 2007

    in advanced filter you'd need 2 columns called age

    Age Age
    >21 <25
    so criteria range =$I$2:$J$3
    this would give
    23
    23
    22
    23
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  9. #9
    Registered User
    Join Date
    02-12-2010
    Location
    state college
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: In the Shelly Cashman Series book for Excel 2007

    Thank you both gentlemen, I got it.

+ 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