+ Reply to Thread
Results 1 to 9 of 9

Formula update needed by referring to another table

  1. #1
    Registered User
    Join Date
    10-26-2011
    Location
    California,USA
    MS-Off Ver
    Excel 2007
    Posts
    26

    Question Formula update needed by referring to another table

    Hi,
    I urgently need help with the following formula.
    IF(OR(C14="Non.Project",C14="Operations"),IF(T14="Department",INDEX(Query_Departments[DepartmentID],MATCH(Expenses!E14,Query_Departments[DepartmentName],0),1),INDEX(Query_Offices[OfficeID],MATCH(CONCATENATE(IF(AND(C14="Operations",ISNUMBER(SEARCH(" ",E14,1))),LEFT(E14,SEARCH(" ",E14,1)-1),E14),IF(C14="Operations"," Office","")),Query_Offices[OfficeName],0),1)),"")

    This formula is picking up the data from the following tables which is on separate worksheet

    List of Departments List of Offices

    DepartmentID DepartmentName OfficeID OfficeName
    990 Corporate Development 805 Arizona Office
    100 Development 801 Corporate Office
    300 Engineering & Construction 500 Loraine Office
    910 Executive 839 Palm Beach Gardens, FL Office
    920 Finance & Accounting 853 NE Office
    500 Operations 810 CA Office

    Currently the formula is picking up the numbers from List of Offices.I want to delete it and use only list of departments table for the formula for operations activities. can anyone please guide me with the changes that I need to make in the above formula. I did not create this formula.
    Thanks in advance.

    Deenah

  2. #2
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Formula update needed by referring to another table

    Welcome to the forum! Please click Go Advanced, click the paperclip icon and upload a sample workbook with the tables you mentioned. Sanitize the data first if needed to protect company information, and I'll take a look at it.
    If your question has been satisfactorily addressed, please consider marking it solved. Click the Thread Tools dropdown and select Mark thread as solved.
    Also, you might want to add to the user's reputation by clicking the star icon in the lower left corner of the post with the answer- it's why we do what we do...

    Thomas Lafferty
    Analyst/Programmer

  3. #3
    Registered User
    Join Date
    10-26-2011
    Location
    California,USA
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Formula update needed by referring to another table

    Thanks a lot for looking into it. The formula that needs to be updated is in Expense sheet (Coulmn K) K14.
    If I select Operations in C14 and then type of expense then project either Loraine or PG it should refer to the table in data sheet and refer to list of departments and not list of offices which it is currently doing. Also if I select Pg project in E14 it is not linked to formula at all. I need to add the project codes for it which are listed in U 11 and U12 in Data sheet. I did not create the sheet so I am very confused. I will really appreciate your help. Thanks again. Do let me know if you have additional questions.

    Regards,
    Deenah
    Attached Files Attached Files
    Last edited by Deenah; 10-27-2011 at 12:15 PM.

  4. #4
    Registered User
    Join Date
    10-26-2011
    Location
    California,USA
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Formula update needed by referring to another table

    Can anyone help please.

  5. #5
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Formula update needed by referring to another table

    Deenah;
    1st - your profile says you're working in Excel 2003, but the file you uploaded is an .xlsx file, so you might update your profile.

    The computer I'm working on right now only has Excel 2003. If you can save your file in .xls format and upload it I'll look at it. Or when I get on another computer I'll look at it if no one else has solved your problem.

    In the mean time:
    Your formula is very complex. Try using "Formula Auditing" > "Evaluate Formula". It will step through your formula one calculation at a time and show you the order that each part of the formula is calculated and the results. I don't know where "Formula Auditing" if in 2007's ribbon, but it shouldn't be too hard to find.
    Last edited by foxguy; 10-28-2011 at 04:07 PM.
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

  6. #6
    Registered User
    Join Date
    10-26-2011
    Location
    California,USA
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Formula update needed by referring to another table

    Thank you Foxguy for your reply.I have updated my profile to excel 2007. Unfortunately if I try to save the file in 2003 then the formulas are lost. So I will wait for you to look at the file in excel 2007 version.Any help would be highly appreciated.In the meanwhile I will look into Formula auditing as per your suggestion. Thanks a lot.

    Regards,
    Deenah

  7. #7
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Formula update needed by referring to another table

    I got lost trying to follow all the formulas.
    Tell me what cell has the wrong result. And tell me what the result should be.

    I personally would have hidden columns with partial formulas in them and have the final formula (which would be easier to follow) in the results cell.

  8. #8
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Formula update needed by referring to another table

    I made that last entry while in pain. I have a problem with my shoulder.

    I don't use that other computer because it's a desktop and the angle I have to hold my arm to use it hurts my shoulder. So I hadn't thought my response out yet.

    Now I'm back on my laptop and can think straight. I think I might have gotten enough to give you an idea of how to fix your formula.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Then alter the part you want changed.

    If you want to then put it back into 1 formula.
    1) Replace "$AI14" with the contents of $AI14 (without the "=")
    2) Replace "$AH14" with the contents of $AH14 (without the "=")
    etc...
    Last edited by foxguy; 11-02-2011 at 10:50 PM.

  9. #9
    Registered User
    Join Date
    10-26-2011
    Location
    California,USA
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Formula update needed by referring to another table

    Thank you so much. I just saw the post. I will use the formula and let you know if it works. Thanks a ton again.

+ 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