+ Reply to Thread
Results 1 to 8 of 8

Automate Drop Down selection

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Automate Drop Down selection

    Hello:

    Please refer to attached file.
    i have a drop down list in cell F3 which consist of 15th of month date and end of month date.
    I need a formula to automate to change beyween this 2 selection depening on todays date.
    If date is between 5th of the month thru 15th of the month then F3 needs to be 15th of month
    If date is between 16th of the month thru 4th of the next month then F3 needs to be 31st of month.


    Let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,638

    Re: Automate Drop Down selection

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    and

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Automate Drop Down selection

    Disregard!
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,638

    Re: Automate Drop Down selection

    Sorry, might have misunderstood the requirement:

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Regards, TMS

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Automate Drop Down selection

    Quote Originally Posted by TMS View Post

    =IF(AND(B2>=DATE(YEAR(B2),MONTH(B2),5),B2<=DATE(YEAR(B2),MONTH(B2),15)),DATE(YEAR(B2),MONTH(B2),15),EOMONTH(B2,0))
    That can be reduced to:

    =IF(AND(DAY(B2)>=5,DAY(B2)<=15),B2-DAY(B2)+15,EOMONTH(B2,0))

  6. #6
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Automate Drop Down selection

    Hi TMS & Tony:

    Solution works.
    Thanks a lot to both.

    Riz

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,638

    Re: Automate Drop Down selection

    You're welcome. Thanks for the rep.


    I prefer Tony's version: much neater

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Automate Drop Down selection

    You're welcome!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macro to Automate Selection of PivotFields
    By aditya88 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-31-2014, 04:43 PM
  2. How to automate available options from a user selection
    By vicaima in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-05-2012, 08:55 AM
  3. How to automate color survey selection?
    By elfiky in forum Excel General
    Replies: 1
    Last Post: 09-25-2011, 10:03 AM
  4. Automate dropdown selection
    By FDaniel in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 04-04-2007, 11:42 AM
  5. Automate cell selection
    By mayanklal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-12-2006, 11:35 AM

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