+ Reply to Thread
Results 1 to 9 of 9

T accounts - formula to auto complete

  1. #1
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    T accounts - formula to auto complete

    Hi,

    I have a problem and I am sure there is a smart way to achieve what I need to do.

    I have a data table and I need to move the data into T accounts based on the account number and weather it is a + or -. If it is a “+” it should appear on the right hand side of the data table and left if it’s a “-“

    In the attached example I have dummy data where I have a small data table and 3 different accounts. On the “T accounts” tab I have manually reference the data tab.

    What I require is a formula to do this instead where it allocates each line automatically where it matches the account number to the T account account number.

    Can this be done?

    For ref there is a unique record ID on the data tab if that helps?
    Attached Files Attached Files

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: T accounts - formula to auto complete

    Not the most elegant.. VB should be cleaner, but still does the job.

    Formulas have been populated for the first T-account only
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: T accounts - formula to auto complete

    Hi, thanks for this - it works I can see in the first account.

    When I move it to the other accounts do I need to change the row reference to A1?

    Is the only different between the formulas in C and P the "+" and ="-" parts? Im only asking as I am about to start copying the formula to other 300 accounts

  4. #4
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: T accounts - formula to auto complete

    While, moving to other accounts select the only reference to change would be the account code

    So in C23 it would be
    =IF(ROWS(A$1:A1)>COUNTIFS(Data!$G$6:$G$20,$B$20,Data!$L$6:$L$20,"+"),"",INDEX(Data!$C$6:$C$20,SMALL(INDEX((Data!$G$6:$G$20=$B$20)*(Data!$L$6:$L$20="+")*(ROW(Data!$G$6:$G$20)-ROW(Data!$G$6)+1),),COUNTA(Data!$G$6:$G$20)-COUNTIFS(Data!$G$6:$G$20,$B$20,Data!$L$6:$L$20,"+")+ROWS(A$1:A1))))

    Remember the Rows counter needs to start at A$1:A1 for the first row of the account.

    Yes, the only difference between columns C & P is the +/- sign

  5. #5
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: T accounts - formula to auto complete

    I must be doing something wrong ACE - on the attached I have copied over your fomrula but I have "+" and "-" appearing on both sides.
    Attached Files Attached Files

  6. #6
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: T accounts - formula to auto complete

    Aah..the formula is unwieldy you see. Your range should be non-blank cells only, apologies I forgot to mention that earlier. So change the range upto Row 41 only

    See attached.

  7. #7
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: T accounts - formula to auto complete

    Ok - thats a quick and easy fix!

    Thanks for this - now to replicate it a few hunreded times - wish me luck lol

  8. #8
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: T accounts - formula to auto complete

    Good luck, I am sure a VB solution filtering and pasting would do it in a cleaner and quicker way. You might want to post in the VBA forum and test the waters

  9. #9
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: T accounts - formula to auto complete

    Hi,

    To be honest it doesnt seem like it will take me too long. I do have another thing I have just thought of but I will prepare an example file and upload to a new thread

+ 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. Auto-complete formula function doesn't work properly
    By malahe in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-18-2014, 10:04 AM
  2. Please help, intricate subtotal for main accounts with many sub accounts!!
    By mitch_bossard in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-24-2013, 05:17 PM
  3. [SOLVED] Auto-complete formula?
    By robbyvegas in forum Excel General
    Replies: 4
    Last Post: 07-06-2012, 04:49 PM
  4. Auto Complete/Auto Fill address field
    By moates in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 05-09-2012, 09:15 AM
  5. VBA with PivotTable Count of Accounts - Want to show Sum of Accounts
    By snake10 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-19-2008, 07:27 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