+ Reply to Thread
Results 1 to 6 of 6

HIghlighted range dependent on month selected

  1. #1
    Registered User
    Join Date
    04-11-2013
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    26

    HIghlighted range dependent on month selected

    HI all.
    If anyone can help me get started that would be great. I don't know if there is an easy way but here is what I have:

    Year-To_date = 4 ' select from drop down box tied to cell b3.

    [Jan Feb Mar Apr May etc.
    10 20 100 70 8

    The user would select a month in numeric format from the drop down box above....in this case 4. Then the rows would highlight in a color (light green) to include the months and the numbers below from Jan up to and including the month selected...in this case 4.

    I don't think conditional formatting would work since it is tied to a cell value and in this case the cells have an abbreviated month in them, while the drop-down has a number representing a month in it. Would a macro tied to the drop-down box be key to highlight both rows? Any idea on the macro? Much thanks.

    v
    Last edited by orozvik; 04-18-2013 at 01:45 PM. Reason: [SOLVED]

  2. #2
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: HIghlighted range dependent on month selected

    Hi,

    try this: Month.xlsm

    Please note: when the months are listed in a different column than in the file or the first row of data is different you have to adapt this in the code.

    Mark this thread SOLVED and click the star if this answer solves your problem.

    Regards
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

  3. #3
    Registered User
    Join Date
    04-11-2013
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    26

    Red face Re: HIghlighted range dependent on month selected

    Awesome macro tehneXus. It does great, but opposite of what Im trying to accomplish. I played with it but had no luck getting it to understand my goal. I've attached your file but with an insert showing what Im trying to accomplish.

    I'll be sure to Solve this thread and definetly click the star. Look for it and thanks many times over my friend.*****
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: HIghlighted range dependent on month selected

    Hi,

    try Month(1).xlsm

    Regards

  5. #5
    Registered User
    Join Date
    04-11-2013
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: HIghlighted range dependent on month selected

    tehneXus. Thats it! Wow!!

    I appreciate your quick help on this one..you nailed it fast!!!! I will learn from your code and hope others will as well as this is a frequent piece of coding for forecasting and budgeting models that can be automated. I'll thank you again here and be sure to go and mark the thread SOLVED now and click the star. Awesome work...thanks!!!

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: HIghlighted range dependent on month selected

    Hello tehneXus,

    I like your signature, very clever!
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ 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