+ Reply to Thread
Results 1 to 6 of 6

Macro to add Date, Month and Year

  1. #1
    Registered User
    Join Date
    08-14-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    13

    Macro to add Date, Month and Year

    Hi All

    I attached an excel sheet which required the desired output.

    There are two combo buttons
    1. Add Channel
    2. Add Month

    1. Add Channel

    This button is used to add a channel in the current excel sheet. For E.g If I select Channel 5 It adds with 00:00:00 on time band column (example show in the sheet)

    2. Add Month

    This button is used to add Date,Month,Year horizontally on the same sheet.I found it a difficult one as I am unable to write an advanced macro.

    Following is the link to download the excel sheet

    https://drive.google.com/file/d/0B_e...ew?usp=sharing


    I hope anyone can help me out on this dilemma.

    Regards
    Cityguy
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: Macro to add Date, Month and Year

    When you click the month button, where is the month and year supposed to go?

  3. #3
    Registered User
    Join Date
    08-14-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Macro to add Date, Month and Year

    If I select January 2015 and click Add month

    It will populate the cells on the same sheet in the following pattern as mentioned in the file.

    Jan.15
    Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: Macro to add Date, Month and Year

    Here ya go,
    The results of the comboboxes are hiding behind the comboboxes.
    Right click on the sheet tab and select view code,
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-14-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Macro to add Date, Month and Year

    Its not working

  6. #6
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: Macro to add Date, Month and Year

    Really.....
    As soon as I opened it, and changed the Month or year, it automatically adjusted, so... that would mean it is working.

+ 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. Sort month/date/year data using month and date only
    By SMW820 in forum Excel General
    Replies: 8
    Last Post: 11-18-2014, 08:39 AM
  2. How can i show date in this form (month,last date of that month, Year)?
    By vjharry in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-24-2014, 04:39 AM
  3. Need to convert Month/Date/Year to Year/Month/Date so excel will recognize
    By juliettelam in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-25-2014, 04:17 PM
  4. Macro or Formula to create Date range by getting input of month and year
    By indianhp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-03-2013, 11:00 AM
  5. Replies: 3
    Last Post: 09-04-2013, 10:49 AM

Tags for this Thread

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