+ Reply to Thread
Results 1 to 16 of 16

Vb code for breaking figures and calcuation of days

Hybrid View

master sachin Vb code for breaking figures... 02-20-2014, 12:41 PM
alansidman Re: Vb code for breaking... 02-20-2014, 12:49 PM
master sachin Re: Vb code for breaking... 02-20-2014, 12:56 PM
alansidman Re: Vb code for breaking... 02-20-2014, 01:03 PM
ufopilot Re: Vb code for breaking... 02-20-2014, 01:06 PM
master sachin Re: Vb code for breaking... 02-20-2014, 01:29 PM
master sachin Re: Vb code for breaking... 02-20-2014, 01:34 PM
master sachin Re: Vb code for breaking... 02-20-2014, 02:00 PM
master sachin Re: Vb code for breaking... 02-21-2014, 12:38 PM
MarvinP Re: Vb code for breaking... 02-21-2014, 02:03 PM
master sachin Re: Vb code for breaking... 02-22-2014, 09:16 AM
MarvinP Re: Vb code for breaking... 02-22-2014, 01:09 PM
master sachin Re: Vb code for breaking... 02-23-2014, 08:06 AM
master sachin Re: Vb code for breaking... 03-02-2014, 04:49 AM
master sachin Re: Vb code for breaking... 03-07-2014, 11:13 AM
master sachin Re: Vb code for breaking... 04-17-2014, 01:48 PM
  1. #1
    Registered User
    Join Date
    02-15-2014
    Location
    INDIA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Vb code for breaking figures and calcuation of days

    Hi,

    i have two sheets, both are data sheets, in one sheet

    a column - date , b column - payable amount

    and second sheet have data like

    a column - date , b column - received amount

    now i wants to calculation of number of days payable amount vs received amount

    any one have any idea for it.

    Thanks in advance

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2509 Win 11
    Posts
    25,000

    Re: Vb code for breaking figures and calcuation of days

    No need for VBA, a simple formula will do this. In column C of Sheet2 =A2-Sheet1!A2 and format as number, 0 decimals.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    02-15-2014
    Location
    INDIA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Vb code for breaking figures and calcuation of days

    Dear Master,

    Just thinnk if

    b column - payable amount is > then column - received amount,or

    b column - payable amount is < then column - received amount,

    then we need to insert new line manually and break the amount, and adjusted received amount upper or down

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2509 Win 11
    Posts
    25,000

    Re: Vb code for breaking figures and calcuation of days

    I am confused by your request. First you ask for the difference in days and now you want to know if full payment has been received and if not then determine outstanding balance. Is this correct? If so, then I urge you to attach a sample spreadsheet with some data that shows scenarios. Then show the results manually prepared and calculated so that we can see specifically what you are needing.

    It need not be a massive listing, but only several types of scenarios.

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. 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 demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  5. #5
    Forum Contributor
    Join Date
    12-11-2010
    Location
    Indiana, USA
    MS-Off Ver
    Excel 2007
    Posts
    118

    Re: Vb code for breaking figures and calcuation of days

    use the received date minus the payable date

    this assumes the payable amount is related to the received amount in both sheets!!!
    =received!A2-payable!A2
    place in the cell to get the result -copy down
    the names before the "!" are the sheet names - yours may differ.

  6. #6
    Registered User
    Join Date
    02-15-2014
    Location
    INDIA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Vb code for breaking figures and calcuation of days

    BOSS,

    As per your order, i have attached sample file for understanding of it.Please look it, can we talk on line........
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-15-2014
    Location
    INDIA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Vb code for breaking figures and calcuation of days

    Master,

    in Attached file have two sheet, before working sheet and second sheet is manual calculation of days through adjusted received amount against Payable amount.

    I hope you understand my point, i need to run that process for 1000 employees with bigger data base, i just give a samples of it in attached data file.

  8. #8
    Registered User
    Join Date
    02-15-2014
    Location
    INDIA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Vb code for breaking figures and calcuation of days

    i wrote the process of it,

    first i used cut command the received date and received amount and move up for adjustment purpose for a particular employee, then i have checked the payable amount is bigger or small than received amount, if payable amount is bigger, then i type manual same figure in next column( adjusted) towards adjustment, then i insert new row and cut command for same for other received amount and again i have checked that payable amount is bigger or small than received amount, if payable amount is balanced figure, then i type balance figure in next column (adjusted )...... if received amount is bigger than payable amount then i type payable amount in next column (adjusted).......... same process run for all,..............please you will more clarity on attached file.

  9. #9
    Registered User
    Join Date
    02-15-2014
    Location
    INDIA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Vb code for breaking figures and calcuation of days

    any person helps me about this thread

  10. #10
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,451

    Re: Vb code for breaking figures and calcuation of days

    Hi Master,

    It is time to learn about Tables and Pivot Tables. You first must remove blank rows in your data. Then you need to remove rows where there is no amounts or dates.

    Then create the two columns where the Payments are POSITIVE and Bills are NEGATIVE. This will allow you to do a Running Total in a Pivot Table.

    Then a pivot table (see attached) is possible, and what I think you want. You will need to do some Pivot Table study to find Differences from Previous date to see how long between each pmt or bill.

    You also will need to insure you sort the dates from oldest to newest.
    Last edited by MarvinP; 02-22-2014 at 01:01 PM.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  11. #11
    Registered User
    Join Date
    02-15-2014
    Location
    INDIA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Vb code for breaking figures and calcuation of days

    Dear Guru,

    i need a day calculation against payable amt Vs. received amount on each line level, Please see the manual done calculation sheet. how i have calculated days manually and also read my previous answer on this thread about manual process............... Please kindly think about it, and do one manual step for it. so that you will be found the VB........ and think for a format according to you, where we will calculate number of days on each payable entry..........

    my motive is to calculate the days against payable amt Vs. received amount on each line level, perhaps received amount excess or short, then next received amt will be adjusted on balance basis.

    THANKS in advance and appreciate to you for your thinking and you will try again for generate VB CODE .

    i hope you will break this thread and show that you are the best and topper.

  12. #12
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,451

    Re: Vb code for breaking figures and calcuation of days

    Hi Master,

    Did you read about Tables? Did you look at my answer? You don't need VBA code yet!!

    If you learn about Tables then you will see your data is wrong!! You need to clean up your data (no blank rows or columns) and try again.

    I've given you an answer and you simply want another one that uses VBA. You need to comment on the answer I spent time giving you before I try something else. Perhaps someone else will try to answer your question using VBA but I'm done working on it.

    Also - PMing me and then not following my answer is another demerit for you. Did you know we are here to help for free? We have no obligation to help. My motivation is to teach, not answer. I'd hope to give you enough information about Excel, as a tool, that you could figure out your problem yourself, instead of simply giving you the answer.

  13. #13
    Registered User
    Join Date
    02-15-2014
    Location
    INDIA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Vb code for breaking figures and calcuation of days

    Dear Guru,

    i have already see your result answer, but it is nice, but this not clear my problem, i need a formula / format / VB code, which calculate the no days on each payable line....

    Sorry if you feels wrong from my side, or my replay, but i m looking a VB CODE / FORMAT / FORMULA, which calculate the no of days on each payable line, I attached a sample data, but actual data in lots of thousand rows ( like two sheet - 1 is for payable Amount , 2 is received amount), please think for wide purpose............ perhaps i m wrong to expression my question properly..........

    I know you are spent your important time for it, I really respect and appreciate for your kindness for the users.

  14. #14
    Registered User
    Join Date
    02-15-2014
    Location
    INDIA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Vb code for breaking figures and calcuation of days

    any person know about vb code for this query?

  15. #15
    Registered User
    Join Date
    02-15-2014
    Location
    INDIA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Vb code for breaking figures and calcuation of days

    any person know about vb code for this query?

  16. #16
    Registered User
    Join Date
    02-15-2014
    Location
    INDIA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Vb code for breaking figures and calcuation of days

    any person helps??

+ 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. Breaking down rows based on hours and days
    By Serdica in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-15-2013, 05:38 PM
  2. Conversion of an array of figures inputted into cells as word figures to Excel figures
    By Allan Simpson730 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-08-2013, 07:25 AM
  3. Add figures 60 days back
    By janger in forum Excel General
    Replies: 9
    Last Post: 08-23-2010, 09:15 AM
  4. Breaking down a code......
    By p3te2 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-25-2007, 05:47 AM
  5. Code Breaking
    By dok112 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-17-2006, 04:30 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