+ Reply to Thread
Results 1 to 5 of 5

Payment dates VBA

  1. #1
    Registered User
    Join Date
    01-23-2019
    Location
    Belo Horizonte, Brazil
    MS-Off Ver
    Windows 2016
    Posts
    49

    Payment dates VBA

    Howdy

    I've tried to come up with ideas to solving the problem i'll present through formulas. But now i'm inclined to think that the most optimized solution will be rendered through VBA.

    The problem follows

    Payment dates
    ->05/XX/XX
    ->15/XX/XX
    'Bills are expected to be paid at the rigid dates above. If a bill is received after the 15th of the current month, it'll be then be paid at the 5th day of the following month'

    Example
    Bill delivered_______Expected payment date
    02/01/2019________05/01/2019*
    09/01/2019________15/01/2019*
    28/01/2019________05/02/2019*
    'the asterisk represents the field in which a formula or a VBA code should apply, to show the expected payment date'
    'the field bill delivered is automaticly extracted from the system'

    The questions:
    1) Would it be possible to get this done by just using formulas?
    2) Even if its possible to get the expected result by just using formulas, how would a VBA code look like in this case?
    2.1) I ask this because my sheets usually have over 50k to 60k lines and about 40 columns of other information. All this renders the workingsheet
    heavy as it is. I believe by executing the macro is the most light weight method to the expected result.

    Any ideas?

    Thanks!

    PS: I started learning excel about 5 months ago, and most specificly VBA about a week ago.
    I'm loving using this forum. And dang sure i'm loving to learn how to code in VBA.

  2. #2
    Forum Contributor
    Join Date
    08-22-2017
    Location
    USA
    MS-Off Ver
    2016 WINDOWS and MAC
    Posts
    294

    Re: Payment dates VBA

    Hello,



    This can be achieved quite easily with formulas by using an if statement. please provide sample data in a workbook similar to your layout for us to look at.

  3. #3
    Forum Contributor
    Join Date
    08-22-2017
    Location
    USA
    MS-Off Ver
    2016 WINDOWS and MAC
    Posts
    294

    Re: Payment dates VBA

    HI,

    Disregard a sample.
    See attached which uses an IF statement to calculate your dates.

    You will want to note that the date format is US and not European (mm/dd/yyyy) vs (dd/mm,yyyy). You can change this with cell formatting.
    Attached Files Attached Files
    Last edited by ironfelix717; 02-06-2019 at 11:12 PM.

  4. #4
    Registered User
    Join Date
    01-23-2019
    Location
    Belo Horizonte, Brazil
    MS-Off Ver
    Windows 2016
    Posts
    49

    Re: Payment dates VBA

    Quote Originally Posted by ironfelix717 View Post
    HI,

    Disregard a sample.
    See attached which uses an IF statement to calculate your dates.

    You will want to note that the date format is US and not European (mm/dd/yyyy) vs (dd/mm,yyyy). You can change this with cell formatting.
    Thats pretty much straight forward as you can get.
    How would a three date setting look like? (eg. 10/xx/xx, 20/xx/xx, 30/xx/xx) Would it be =(if(if))?

  5. #5
    Forum Contributor
    Join Date
    08-22-2017
    Location
    USA
    MS-Off Ver
    2016 WINDOWS and MAC
    Posts
    294
    Quote Originally Posted by KarelMusa View Post
    Thats pretty much straight forward as you can get.
    How would a three date setting look like? (eg. 10/xx/xx, 20/xx/xx, 30/xx/xx) Would it be =(if(if))?
    Hi, I'm not sure what you mean. The sample workbook I attached contains a date format of mm/dd/yyyy.

    Changing how the date is formatted should be as simple as changing the cell format

+ 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. Deferred Payment Cash Flows with Dates
    By primeranetworks in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-24-2018, 03:59 PM
  2. Milestone dates to calculate a revenue payment
    By bdlchicago in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-23-2014, 11:24 AM
  3. Billing and Payment Dates
    By CubedSphere in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-22-2012, 07:38 PM
  4. formula for determining payment dates
    By klaarstroom in forum Excel General
    Replies: 2
    Last Post: 11-14-2011, 05:55 PM
  5. One Payment, Multiple Dates, summation
    By GQuinn in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-21-2010, 09:04 AM
  6. Tenancy and Payment Dates
    By Andy Stern in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-12-2008, 12:11 PM
  7. Calculate Loan Payment Dates
    By Vinod Mahendrakar in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-28-2006, 02:10 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