+ Reply to Thread
Results 1 to 6 of 6

Expense spreadsheet to automatically code to the selected cost centre

  1. #1
    Registered User
    Join Date
    05-31-2013
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    85

    Expense spreadsheet to automatically code to the selected cost centre

    I need a formula to automatically calculate codes (cost centres) for an expense spread sheet.

    My spreadsheet will have departments..
    E.G Finance (cost centre 300), HR(405), IT(450)

    It will also have expense type
    E.G Travel (8000), accomodation (8100), food (8120)

    If I chose Finance and travel, the cell with the formula should be 3008000. If the formulas have to be split into two cells (that's fine i will concatenate them) BUT it's be great if someone could do this in one.

    Thanks in advance
    Last edited by MushroomFace; 07-05-2013 at 06:00 AM.

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

    Re: Expense spreadsheet to automatically code to the selected cost centre

    Assume

    Departments and cost centres in column A & B
    Expense type and code in Column C & D

    E1 & F1 contain your choices

    Use
    =iferror(index(b:b,match(e1,A:a,0)),"")&iferror(index(d:d,match(f1,c:c,0)),"")
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: Expense spreadsheet to automatically code to the selected cost centre

    Can you upload a sample file with mock data which has the same/similar layout to your real data. That way we can see how Finance (300) is stored in your sheet etc. as we don't know if this is all in one cell or two cells
    Also need to know how you choose plan to Finance and Travel on your sheet that way we can look up these items and get the 300 and 8000 correctly for you.

    To upload a file click on Go Advanced below and then choose Manage Attachments.
    Say thanks, click *

  4. #4
    Registered User
    Join Date
    08-08-2007
    Location
    Vancouver
    MS-Off Ver
    Excel 2002, Excel 2007, Excel for Mac 2011
    Posts
    38

    Re: Expense spreadsheet to automatically code to the selected cost centre

    MushroomFace see attached Excel example.
    Attached Files Attached Files

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Expense spreadsheet to automatically code to the selected cost centre

    Does the attached help
    Attached Files Attached Files
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  6. #6
    Registered User
    Join Date
    05-31-2013
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    85

    Re: Expense spreadsheet to automatically code to the selected cost centre

    I didn't even realise i could use two V Lookups at the same time.

    Cheers all!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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