+ Reply to Thread
Results 1 to 5 of 5

Macro to assess dates on worksheet and save file

  1. #1
    Registered User
    Join Date
    04-30-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Macro to assess dates on worksheet and save file

    Hello folks!

    I'm learning slowly how to write simple macros, and always find lots of useful information from previous questions on this and other forums, thank you!

    I have posed myself a task to make my life easier whilst at work that I hope you can help me with?

    I have a spreadsheet that I use to keep track of consultation periods on for any type of change at work, for instance terms and conditions, or redundancies.

    I have used a simple formula to give me a count of how many live consultations I currently have ongoing on the register as at when it is opened each time, but I would like the ability to forecast forward.

    I would like to do this by writing a simple macro that does the following:

    • Open the consultation register.xlsx
    • Ask for a date in an input box
    • Insert date from input box into cell B7 of the consultation register.xlsx
    • Compare each of the rows with a blank cell in column U and, if the date in column T is earlier than the date in B7, insert the date from column T.
    • Save the file using a saveas box prefilled with the title consultation register as at [date in cell B7]

    Would any kind individual help point me on the right track please?

    I have attached the spreadsheet in question (excel 2010), there are currently no macros within, just formulae.

    Consultation register.xlsx

    Your assistance is much appreciated. Thank you.
    Last edited by M P; 11-17-2013 at 08:11 AM.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Need help with a macro please

    Hi, M P,

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    04-30-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Need help with a macro please

    Title Changed.

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Macro to assess dates on worksheet and save file

    Hi, M P,

    thanks for changing the title.

    Code used in a standard module:
    Please Login or Register  to view this content.
    The workbook holding the code as well as the workbook which should be opened are expected to be located in the same directory (same goes for the newly saved file). You would need to alter that to suit.

    Ciao,
    Holger
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-30-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Macro to assess dates on worksheet and save file

    Holger,

    I am extremely grateful for your help with this. Thank you very much. I hope that some day I will have enough knowledge to help someone and pass it on :P

+ 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. [SOLVED] Macro to show Which macro didnt work in a nested macro
    By akhileshgs in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-10-2013, 03:21 AM
  2. Perform macro "on open" specific file- store macro in Personal Macro Workbook?
    By thompssc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-17-2012, 12:38 PM
  3. lookup macro, solver macro, realtime macro
    By xelhelp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-02-2011, 06:14 PM
  4. Cannot find macro error when running a macro from a macro in a diffrent workbook.
    By Acrobatic82 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2010, 09:22 AM
  5. [SOLVED] Macro calling another Macro: "The macro 'Personal.xls!FindChar"
    By William Benson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2005, 09:05 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