+ Reply to Thread
Results 1 to 12 of 12

Excel 2007 : Function where results cell equals partial "text" of reference cell??? HELP!!!

  1. #1
    Registered User
    Join Date
    02-07-2012
    Location
    Tulsa, OK
    MS-Off Ver
    Excel 2007
    Posts
    20

    Function where results cell equals partial "text" of reference cell??? HELP!!!

    I think the best way to explain this is to attach the spreadsheet I am trying to finish:

    I am trying to prepare a new sheet that totals the categories in the drop down (account codes) in H8 and subsequent cells (H9, H10 etc) and show the results in K3 (and K4, K5 etc). But I would like the results to only show the "account code numbers" (i.e. only the "6502" of the 6502 - Auto and Truck Expense-Fuels, Gas & Propane, Cost of Goods Sold).

    Additionally, I would like the results cells (K3, K4, K5 etc) to consolidate and total all those that match on previous page for a respective account code "Grand Total" in L3 (etc). So if I enter 3 amounts for account code "6502" on the "Expense Report Sheet", the results cells (K3) would add all the "6502" figures on the "Expense Report Sheet" and calculate in the "Totals" cell of L3 etc.

    I have attached the spreadsheet which I hope will better explain this!!! I have to get this done today and I have driven myself crazy for 5 hours now!!!


    Sample Excel.xlsx
    Last edited by NBVC; 02-07-2012 at 05:57 PM.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Function where results cell equals partial "text" of reference cell??? HELP!!!

    Hi Larry,

    Though I felt that there should be some structural changes / different approach would have been better here, but still gone ahead and tried solving it, see the attached file and let me know if this is what you were looking for. Thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Attached Files Attached Files
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Function where results cell equals partial "text" of reference cell??? HELP!!!

    In K3, try:

    =LOOKUP(REPT("z",255),CHOOSE({1,2},"",LEFT(INDEX($H$8:$H$34,MATCH(TRUE,INDEX(ISNA(MATCH(LEFT($H$8:$H$34,4),$K$2:$K2,0)),0),0)),4),""))

    copied down

    in L3:

    =IF(K3="","",SUMIF($H$8:$I$34,K3&"*",$J$8:$J$34))

    copied down
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    02-07-2012
    Location
    Tulsa, OK
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Function where results cell equals partial "text" of reference cell??? HELP!!!

    Ummmm...all I can say is WOW!!!!!!!

    Thank you VERY VERY VERY Much!!!!!!!!

  5. #5
    Registered User
    Join Date
    02-07-2012
    Location
    Tulsa, OK
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Function where results cell equals partial "text" of reference cell??? HELP!!!

    DILIPandey,

    Ok, I went in and apparently I hadn't copied all the drop down boxes in the first sheet, so they didn't copy to your formula. See attached to see what I mean.

    Sample Excel.xlsx
    Attached Files Attached Files

  6. #6
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Function where results cell equals partial "text" of reference cell??? HELP!!!

    Hi Larry,

    I am unable to see my formula into the spreadsheet... have you applied that or do you want me to apply and send back?

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Function where results cell equals partial "text" of reference cell??? HELP!!!

    If, as you suggest, the same Account code can be selected in several cells in column H, and you want only to show the code once in column K, and sum all totals in column J for each unique code, then I am not sure the DILIPandey's suggestion will do that... it list duplicates in column K....

    See suggestion in Post #3 above, for unique listing...

  8. #8
    Registered User
    Join Date
    02-07-2012
    Location
    Tulsa, OK
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Function where results cell equals partial "text" of reference cell??? HELP!!!

    Quote Originally Posted by dilipandey View Post
    Hi Larry,

    I am unable to see my formula into the spreadsheet... have you applied that or do you want me to apply and send back?

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    If I deleted it I didn't mean to, if you could apply back I would appreciate it! Thank you again!!!

  9. #9
    Registered User
    Join Date
    02-07-2012
    Location
    Tulsa, OK
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Function where results cell equals partial "text" of reference cell??? HELP!!!

    Thank you NBVC!!! This worked perfect. Appreciate your timely help!!!

  10. #10
    Registered User
    Join Date
    02-07-2012
    Location
    Tulsa, OK
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Function where results cell equals partial "text" of reference cell??? HELP!!!

    Quote Originally Posted by NBVC View Post
    In K3, try:

    =LOOKUP(REPT("z",255),CHOOSE({1,2},"",LEFT(INDEX($H$8:$H$34,MATCH(TRUE,INDEX(ISNA(MATCH(LEFT($H$8:$H$34,4),$K$2:$K2,0)),0),0)),4),""))

    copied down

    in L3:

    =IF(K3="","",SUMIF($H$8:$I$34,K3&"*",$J$8:$J$34))

    copied down
    Didn't work after all...here's where I am.

    Demo Excel Sheet.xlsx
    Attached Files Attached Files

  11. #11
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Function where results cell equals partial "text" of reference cell??? HELP!!!

    In the Demo Excel Sheet, did you put in the LOOKUP formula in K3... because it works for me.

    Note: You wiill need to take your worksheet out of Page Layout view for the formulas to automatically pull in new data.

    I am not sure what you are trying to show in the Sample Excel.xlsx workbook, though.

  12. #12
    Registered User
    Join Date
    02-07-2012
    Location
    Tulsa, OK
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Function where results cell equals partial "text" of reference cell??? HELP!!!

    Ok!! I believe I am close. I have tried everyone's formulas/functions and it seems to be close when inserted to a particular cell, but when I try to create what will be input and used on a normal basis, nothing pulls appropriately to K, L. When I plug in the formula in one cell, it might work there, but when I copy down, it does not.

    Here is exactly what I am trying to accomplish. Employee will enter the description of an expense in column "A". In column "B" the date and in "E" the respective amount. Easy enough. Now what I am trying to do is allow the employee to use the dropdowns in "H" to correctly classify the respective expense. In column "J", should just match the total in "E".

    The tricky part is now getting the 4 digit portion of the Account Code's that are used in "H" only to be reflected in column "J", BUT only once, if used, and consolidated for the number of entries or itemized expenses.

    EXAMPLE: if I enter "Gas" in "A" and 02/08/12 for the date in "B" and $53.00 for "E" for the amount. I use the dropdown and select, "6502-Auto & Truck Expense-Fuel, Gas & Propane-Cost of Goods Sold". Column "J" should also reflect $53.00.

    I need column "K" to reflect "6502" (only) and $53.00 to appear in Column "L". Now if I enter Office Supplies in "A", 02/08/12 in "B" and $32.00 in "E". I use dropdown and select "7310-Office Equipment/Supplies-Consumable Supplies-SG&A Expense" - Column "J" should read $32.00. Column "K" should show "7310" and "L" should show $32.00.

    If I enter another subsequent "Gas" or 6502 or "Office Supplies" or 7310 expense in other entries (for example another "Gas" entry for $51.00), Column "K" should still only have one '6502' cell and "L" should now read "104.00".

    If there also anyway for columns E, J & L to be blank without a prefilled "$" or a "0" until an entry is made, would be an added bonus!!!!!!!!

    This is the best way I can explain it perhaps. I have attached another 'cleared field' spreadsheet. Can anyone just input these formulas that clearly seem to work for you (and me) until I try to copy and paste down. I can't tell you how much I would appreciate it!!!! Please let me know if there are any questions. I thought I was somewhat saavy enough to do this, but have proven my shortcomings in detail!!!!

    Demo Excel Sheet Test.xlsx

+ 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