+ Reply to Thread
Results 1 to 3 of 3

Using VB to find a range based on todays date and todays date +30

  1. #1
    Registered User
    Join Date
    01-11-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    16

    Using VB to find a range based on todays date and todays date +30

    1 column in my sheet is a list of dates (affectively a calendar). I am trying to create a macro that will only display rows 1-5 and then current the current date and the next 30 days and hide all other rows.

    The approach I have tried is to use “ADDRESS(MATCH(BS40,$B$1:$B$462,0),2)” equation to find the cell with todays date in it (Cell BS40 contains todays date). This was repeated for todays date +30. The problem I have is that although I now have the cell address’s located I cannot reference their values in a range.select

    What I want to do is somwthing like this:

    Please Login or Register  to view this content.
    Where Y1 and Y2 contain the cell addresses that I want to use to create my range.

    But I cant get this to work (tied a number of variations)…

    I have started to look at the FIND range method but at the moment it’s a bit beyond me.

    Anyone have any suggestions

    Thanks in advance,

    Steve Loveday
    Last edited by Steve_al; 08-13-2009 at 09:34 AM. Reason: solved

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Using VB to find a range based on todays date and todays date +30

    will this macro help you

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-11-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Using VB to find a range based on todays date and todays date +30

    Thanks a lot Venkat,

    I won't pretend to understand it fully but if works out well.

    Cheers

+ 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