+ Reply to Thread
Results 1 to 2 of 2

Create a macro to change dates based on the number of rigs

  1. #1
    Registered User
    Join Date
    08-01-2016
    Location
    Irving, Texas
    MS-Off Ver
    Office 2013
    Posts
    1

    Create a macro to change dates based on the number of rigs

    Hello All!


    I am trying to write a macro that makes changes to the dates of existing cases based on the available number of rigs. For example,

    I have a spreadsheet with a list of 1000 cases (aka wells) that start on a particular date
    Start Date
    Case 1 5/1/2016
    Case 2 6/1/2016
    Case 3 7/1/2016
    Case n 8/22/2025

    I want to create a macro that drills the cases (aka wells) based on the number of rigs available. For example

    Year # of Rigs
    2016 2
    2017 3
    2018 4
    2019 4

    Each rig drills 14 wells per year. So 2 rigs will drill 28 wells per year. Three rigs will drill 42 wells per year, so on so forth. Imagine that in 2016 we have to drill 100 wells in a given scenario, but with a change in the number of rigs we can only drill only 28 wells. I want to change the dates of the wells based on the availability of the number of rigs.


    I can do this manually however it would take a lot of time considering our schedule goes out till 2056. Any inputs or suggestions to start this workflow would be much appreciated.


    Thanks,
    Ganesh

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Create a macro to change dates based on the number of rigs

    Hi Ganesh,

    Welcome to the Forum!

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

+ 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] is this possible? - Create new sheets based on dates submitted in macro
    By vpan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2016, 11:54 PM
  2. Macro to create new workbooks based on change in customer name
    By Yoogo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-02-2016, 02:01 AM
  3. Replies: 12
    Last Post: 06-13-2014, 05:03 PM
  4. Macro to create sets of tables based on number input
    By anubis512 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-18-2014, 01:43 PM
  5. Help to create Macro to Auto-fill end of month based on given start and end dates
    By patidallas22 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-15-2014, 11:26 AM
  6. Calculate number of days between 2 dates & then assign a number based on the answer
    By MrHappyGoLucky12 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-27-2014, 09:20 PM
  7. Based on col dates create col of dates for the first day of that same month and year
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-28-2011, 09:32 PM

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