+ Reply to Thread
Results 1 to 20 of 20

Automated Lookup

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

    Automated Lookup

    Hi,

    I require a formula that will help me populate T account headings.

    I have a data sheet which has a number of GL codes in column G. What I would like is a formula on the “GL Accounts” sheet to self populate unique codes (similar to an advanced lookup with unique fields only).

    Then – the main part if the above can not be done (I call always do the filter) is once the list is established on the “GL Accounts” tab I would require the T account headings to self populate.

    e.g. The first 2 account looks for the first GL account, then the 2nd T account looks for the 2nd and so on and so on

    The fomrula would need to go in the red highlighted cells

    Can anyone help please?
    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: Automated Lookup

    To get unique codes use

    In D5 of GL Accounts sheet

    =IFERROR(INDEX(Data!$G$6:$G$20,MATCH(0,INDEX(COUNTIF($D$4:D4,Data!$G$6:$G$20),0,0),0)),"")

    Copy down
    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: Automated Lookup

    Hi, that unique code worked thanks.

    Can a formula for the red cells be achieved or should I accept its manual?

    The reason being if I add new T accounts I want to be able to copy and past one already there and only manual reference as few cells as possible

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

    Re: Automated Lookup

    If the red cells are evenly spaced i.e. interval of 16 rows as in your example you could use

    In B4
    =INDEX('GL Accounts'!$D$5:$D$7,CEILING(ROW(A1)/16,1))

    Copy down

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

    Re: Automated Lookup

    Hi,

    I didnt have the full picture before but now understand that there will be a lot (hundreds) of transactions I need to account for. (I only knew this after I built my model). Previously I had a handful of popular accounts which took 50 entries in each (50 rows) and then a few other accounts with say only 5 rows.

    What I was thinking is can the fomrula to be adapted to include an indirect formula where I have a seperate tab for each GL code (like in the attached example)?

    I have approx 30 accounts so this would mean the file size is large meaning the spreadsheet be slow but I can see no other way of achieving this.
    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: Automated Lookup

    This now gets further and further into the VBA domain.

    A simpl-ish code would give you a cleaner, efficient solution without any of the fancy Indirect functions or formulas that return multiple values based on lookup value.

    Do post in the VBA sub-forum, I'm sure someone will sort this out in no time.

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

    Re: Automated Lookup

    Ok - I will go, here goes

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Automated Lookup

    Would this be by chance what you are looking for? I also added a formula to the GL worksheet that is a little tolerant of blank cells if they should happen to occur.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

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

    Re: Automated Lookup

    Hi,

    This seems to do it yes! I will test this fully though and get back to you before I mark as solved

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

    Re: Automated Lookup

    Hi,

    Your formula worked just how I wanted to thank you!

    I also need to include a 2nd (and final) data set if this is possible.

    The data2 set that I need is in a completley different format to the first set.

    The data2 sheet has individual rows with each row having to posting entries e.g. in the example the first row is £494.60, this needs to be debited to 213000 and credited to 500000

    I have highlighted in red what ideally I would like the code to perform.

    Can this be achieved?
    Attached Files Attached Files

  11. #11
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Automated Lookup

    I wouldn't try to put the two data sources into the same summary. I separated the data sources. You can create totals under them if required. To combine the two sources into one summary would, I think, be very cumbersome to keep maintained if it could be made to work in the first place.
    Attached Files Attached Files

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

    Re: Automated Lookup

    Hi, you were spot on about having them in two different tables - its thr right thing to do!

    My model is evolving nicely

    I do have a slight problem with the lookup on the 2nd data set.

    On the T Account sheets:
    213000
    500000
    662200

    Within the Cell Range columns (AC:BB) it should pull data from the “Data 2” sheet. Currently it has these array formulas:
    Column AG
    Please Login or Register  to view this content.
    Column AT
    Please Login or Register  to view this content.
    However the problem is that its returning a barcode incorrectly and I am unsure why.

    e.g. on the sheet 500000, cell AT7 this should be test1 barcode
    e.g. 2 – on the sheet 552200, Cell AT7, this should be test2 barcode

    Any ideas?

    I have uploaded the latest model - its the yellow cells on the account sheets
    Attached Files Attached Files

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

    Re: Automated Lookup

    I have included new data on the data sheet2 tab and I still get problems.

    On the data2 sheet i have 2 acocunts (251200 and 241100) but the entries are duplicating.
    Attached Files Attached Files

  14. #14
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Automated Lookup

    I don't know what happened to the file that I uploaded because when I downloaded it, it had the problems that you encountered. I had checked against this before uploading and didn't encounter a problem. I couldn't find a problem with the formulae but they didn't work. When I re-entered them by hand they worked....go figure. The template worksheet started on the wrong row and that would cause a problem if you were to copy that worksheet to start another worksheet because the formulae expected a different start row. Seeing that your data was dramatically expanding, I enlarged the rows addressed to 10000.

    On Data 2 you want 2 dates but there was only 1 so I repeated it.
    Attached Files Attached Files

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

    Re: Automated Lookup

    Very grateful for this! The formula worked as expected!! Version 5 already, it will be V100 before long!

  16. #16
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Automated Lookup

    I don't know how many worksheets you plan on having but this could get very big in a hurry.

    If I was doing this, I wouldn't have a worksheet for each G/L Acct. All the data gathering can be done from the Data Worksheet by either using a Table or the Filter on the Data Tab. If a copy was needed to print, filter the records to get what you want, select the range of cells filtered, Go To Special, Visible Cells, copy, and paste on a new worksheet.

    The monthly statistics can be gathered by using a TOTALS row on the table if you choose to use a table. Just filter for the G/L the other criteria that you need and the totals will be presented to you in the last row as they apply to the filtered data. In the totals row, you choose for each column what you want the totals to be.

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

    Re: Automated Lookup

    Hi,

    I am worried about how big it is becoming! I think the design will be ok for a couple of reasons... When it goes live it will have a limited amount of accounts, only approx 15 which should help the file size. In the sample data I have there are 15 but once I have actual data it will be reduced.

    Then there is a requirement to see the data in the T accounts mainly because I need to see the accounting and be able to track it through differenent accounts.

    It should only be completed on a monthly basis anyway to ensure everything is reconicled so if its built and then processes for 10 mins then that will be ok.

    Thats what I am telling myself anyway! Ive spent too long to go back now lol

  18. #18
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Automated Lookup

    I'm just trying to prevent you from designing yourself into a box that you can't get out of.

    When you have all the worksheets for the various accounts, you shouldn't have to touch them again as all the data is drawn from the Data and Data 2 worksheets.

  19. #19
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Automated Lookup

    Here is your file with excess formatting stripped (endpoints of data on each worksheet reset). This is the same as the last version uploaded but with the excess formats stripped out. This should improve performance.

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

    Re: Automated Lookup

    Thanks for the advice on this, in the past ive got myself in lots of boxes and wasted alot of time!

    What I am planning to do next is get a formula that will create a unique list of accounts based off three datasets. Then when I have this I will have each of the tabs linked to that sheet (where you put the account code on the T account sheets cell B2).

    Then finally run a macro to run a code which will rename the sheet based on the value in B2.

    Thats the plan, unsure if it will work or not

+ 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. Automated Count
    By Sean_Lfc in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 10-20-2014, 02:43 PM
  2. Automated url look up in who.is?
    By Flabbergaster in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-19-2014, 01:58 PM
  3. How to automated this?
    By Nasri.3900 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-18-2013, 05:15 AM
  4. Automated processing
    By ij1001 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-04-2011, 06:44 AM
  5. automated timed data lookup and storing
    By adroc67 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-12-2008, 01:36 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