+ Reply to Thread
Results 1 to 14 of 14

Code to transfer latest entry from sheet 'Account' to sheet 'Summary' automatically

  1. #1
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Code to transfer latest entry from sheet 'Account' to sheet 'Summary' automatically

    Hi friends,
    I want to create a balancesheet of my accounts. I want to transfer the latest entry of each of my account from sheet 'Account' to sheet 'Summary' automatically after entering the data in the account.

    The final output of it should be as follows in 'Summary' sheet:

    ACCOUNTS
    NAME OF BANK DATE PARTICULARS WITHDRAWN DEPOSIT BALANCE
    Bank of A 10-01-2014 By cheque 0 300 700
    Bank of B 15-01-2014 By cash 0 5000 6200
    Bank of C 20-01-2014 By cheque 0 3000 3700
    Bank of D 28-01-2014 By cheque 0 6000 8700
    Bank of E 14-01-2014 By cheque 0 5000 5700
    Bank of F 18-01-2014 Self 500 0 200

    Please suggest me a code to achieve this target automatically.

    Thanking you in anticipation.

    Regards,

    Mukesh
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Code to transfer latest entry from sheet 'Account' to sheet 'Summary' automatically

    I wrote the macro that will postn all bank accounts into summary and mark each entry as posted

    Note: it is unclear what to do with the balance column in the summary (I copied the balance from the bank account)
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Code to transfer latest entry from sheet 'Account' to sheet 'Summary' automatically

    Please Login or Register  to view this content.
    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

  4. #4
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Code to transfer latest entry from sheet 'Account' to sheet 'Summary' automatically

    Hi Bsalv,
    Excellent! It's working fine.

    in the code 'dim (1 to 100, 1 to 6)'

    What does the number 100 and 6 means/refer?

    Thank you RCM and Bsalv for solving my problem.

    Have a nice day!

    Regards,

    Mukesh


    [code]

  5. #5
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Code to transfer latest entry from sheet 'Account' to sheet 'Summary' automatically

    now you only have 6 bankaccounts but suppose you add some more, then you don't have to change something. So that 100, you can change it to a number >=6.
    the 6 is the number of values you collect for each account (bank, date, particular, ...)

  6. #6
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Code to transfer latest entry from sheet 'Account' to sheet 'Summary' automatically

    Hello Bsalv,
    Thank you for explanation. Now I understood the code. I will modify it for deposit and debit sheet also. If I have any problem I will take your guidance positively.

    Thank you.

    Regards,

    Mukesh

  7. #7
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Code to transfer latest entry from sheet 'Account' to sheet 'Summary' automatically

    The post is deleted.
    Last edited by mukeshbaviskar; 01-29-2014 at 07:25 PM.

  8. #8
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Code to transfer latest entry from sheet 'Account' to sheet 'Summary' automatically

    Hello Bsalv,
    Please see the pdated file and do modify the code to get correct output. I want all the 'FD' entries in the summary sheet and not as other macros 'account' and 'debit' latest entry.

    Extremely sorry for trouble and thanks for guidance.

    Regards,

    Mukesh
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Code to transfer latest entry from sheet 'Account' to sheet 'Summary' automatically

    as you use excel2007, it's perhaps easier to use tables (called listobject in VBA), that is a real handy thing.
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Code to transfer latest entry from sheet 'Account' to sheet 'Summary' automatically

    Hi Bsalv,
    Thank you for revision. But this code is not working. I'm getting message 'excel found unreadable contents .. file name .. if you trust it then click on yes/no'.

    This code is hard to understand me. Your first code was very good only I want to correct the 'summary_debit' code to get correct output.

    Secondly I want the entire list of my deposits in the summary sheet. So there is need to change the code.

    I don't want total at the bottom of the table because I have already created a summary table at the leftmost side from column 'b'.

    Please do the revision and tell me where I was wrong. So that I will learn it and avoide it in future.

    Sorry for trouble and thank you for your kind assistance to solve my problem.

    Mukesh

  11. #11
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Code to transfer latest entry from sheet 'Account' to sheet 'Summary' automatically

    did you ever work with tables ?
    Everything can be done with formulas without VBA if you allow the use of tables.
    Do you agree ?

  12. #12
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Code to transfer latest entry from sheet 'Account' to sheet 'Summary' automatically

    Yes, I agree with you. I use it and know how to get output on another sheet using formulas. I don't want to use formulas for a large database because it increases the size of file. A single macro does a lot of work which several formulas do and lessen the size of file.

    So I want to have a vba code to achieve my target.

    I request you to correct 'summary_debit' code and change 'summary_deposit' code to get desire correct output. It will be more helpful for me.

    Thanking you in anticipation. Sorry for trouble.

    Mukesh

  13. #13
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: Code to transfer latest entry from sheet 'Account' to sheet 'Summary' automatically

    the 1st idea, but a little bit modified, so I think it's easier for you to read and understand.
    Attached Files Attached Files

  14. #14
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Code to transfer latest entry from sheet 'Account' to sheet 'Summary' automatically

    Hello Bsalv,
    Excellent! Now this is easy to understand for me. It's working fine with correct output.

    Thank you very much.

    Regards,

    Mukesh

+ 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] VBA code to automatically transfer data from one sheet to another based on dropdown
    By jadersantos in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-22-2013, 11:01 AM
  2. Replies: 1
    Last Post: 04-07-2013, 05:33 AM
  3. Replies: 1
    Last Post: 02-13-2013, 01:32 PM
  4. [SOLVED] Auto transfer rows from 1 sheet to another by account code.
    By Syd in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-09-2006, 12:10 PM
  5. Replies: 2
    Last Post: 01-12-2006, 10:35 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