Consulting

Results 1 to 2 of 2

Thread: Solved: Selecting Range based on criteria?

  1. #1
    VBAX Contributor
    Joined
    Feb 2007
    Posts
    126
    Location

    Red face Solved: Selecting Range based on criteria?

    Hi all!

    I have a reporting macro/spreadsheet, which dumps some info from Active Directory...

    Lets say I have columns A & B, in column A I have a list of machines, in column B I have a list of last logon times...

    I know how to e-mail from Excel a range("B15:B20") <-- for example... but what I want to do is to select a range based on the last logon times:

    Machine Name Last Logon
    HOUIC-S-005 23/01/2007 16:23
    AMSDC1-S-601 15/01/2007 03:13
    AMSDC1-S-600 19/01/2007 11:37
    HOUIC-S-091 15/02/2007 06:50
    PHC-S-01012 20/02/2007 08:38
    AMSDC2-S-01364 20/02/2007 03:05
    NOR-S-01000 16/02/2007 15:49
    AMSDC2-S-01572 09/02/2007 16:19
    AMSDC1-S-01432 14/02/2007 03:10
    abe-u-d00068 No Local Logon

    So first I need to sort data by LastLogon (not sure how to do that programmatically)

    Then choose range in a form (A1:Ax;B1,Bx) <-- not sure if thats right, based on data in Last Logon which is
    a) equals to "No Local Logon"
    b) 2 months less then todays date...

    Any suggestions on how to do this?

    Your help would be much appreciated! Thanks a lot, Mike

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Post the workbook to help us, and maybe kill the other thread?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •