+ Reply to Thread
Results 1 to 3 of 3

How to split date range and volume into months

  1. #1
    Registered User
    Join Date
    07-07-2016
    Location
    Zurich
    MS-Off Ver
    2010
    Posts
    2

    Question How to split date range and volume into months

    Hi!

    I'm new to the forum and have been searching all over the place for some VBA code proposal I could apply to my problem.
    Sadly I'm very inexperienced still (began learning on my own some weeks ago) and therefore haven't gotten a lot further.

    The big list of data I work with in sheet 1 is as follows:
    Sales contracts in A:A
    Product in B:B
    The number of products booked per Sales contract in cell A in C:C
    A valid start date in D:D
    A valid end date in E:E
    The number of months validity in F:F (which I calculate myself based on C and D's input by means of formula)

    What I'm looking for in the VBA code:
    to allow me to paste data in sheet1 according to the structure above and accordingly will create in sheet2 a table per contract and product with
    - a column for each month of the date range per contract, e.g. C1= 01.07.2016 and D1= 30.09.2016 so July 2016, August 2016 and September 2016
    - divide the number of products on that contract equally over each month
    - months outside of the range of course should not show any value
    - needs to allow year changeovers
    - preferably ran after a click on a button

    We have made a file with excel formula but it's not pretty (plus sensitive info), so hence my post here
    I've made a layout example in excel but can't attach it for some reason.

    Any help is much appreciated, of course I will continue to study my file improvements but a start would be great!
    Last edited by okok15266; 07-08-2016 at 03:38 AM.

  2. #2
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: How to split date range and volume into months

    Hi,

    Welcome to the forum.

    We have to see how the source file looks like.
    Unfortunately we have to see an excel to really understand your problem.
    Please remove the real data and add test values so we can help.

    Below is a link where you can find more materials if you want to learn VBA.
    http://www.excelforum.com/excel-prog...materials.html

    Cheers,
    Ionut
    Please consider:
    Be polite. Thank those who have helped you.
    Click the star icon in the lower left part of the contributor's post and add Reputation. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .
    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Posting code between tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

  3. #3
    Registered User
    Join Date
    07-07-2016
    Location
    Zurich
    MS-Off Ver
    2010
    Posts
    2
    Quote Originally Posted by IonutC View Post
    Hi,

    Welcome to the forum.

    We have to see how the source file looks like.
    Unfortunately we have to see an excel to really understand your problem.
    Please remove the real data and add test values so we can help.

    Below is a link where you can find more materials if you want to learn VBA.
    http://www.excelforum.com/excel-prog...materials.html

    Cheers,
    Ionut
    Thanks!! Ok think I attached it now, hope it's helpfull.
    Attached Files Attached Files

+ 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. Split the equal amount acoss months based on start and end date
    By Ktahilramani in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-07-2014, 11:18 PM
  2. [SOLVED] How to develope a self aware volume / time (months) formula
    By R3CON3D in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-28-2013, 09:33 AM
  3. [SOLVED] Split data into 3 segements of each volume and value
    By Kramxel in forum Excel General
    Replies: 5
    Last Post: 11-13-2012, 02:19 PM
  4. Replies: 2
    Last Post: 01-04-2012, 09:15 AM
  5. Auto calculate no. of months given a date range.
    By gilbert in forum Excel General
    Replies: 5
    Last Post: 07-12-2010, 03:05 AM
  6. Months in a date range
    By orivera in forum Excel General
    Replies: 2
    Last Post: 07-25-2008, 04:15 PM
  7. Count # of months in date range
    By JChandler22 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-17-2008, 09:14 AM
  8. gettings months from date range
    By brai in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-16-2007, 01:14 PM

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