+ Reply to Thread
Results 1 to 7 of 7

simplifying formula

  1. #1
    Forum Contributor
    Join Date
    12-11-2013
    Location
    St Moritz, GR, Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    187

    simplifying formula

    Can I simplify the below formula?

    =IF(VLOOKUP("*"&(LEFT($A3,8))&"*",$D$3:$E$40000,2,FALSE)="Not Available","",VLOOKUP("*"&(LEFT($A3,8))&"*",$D$3:$E$40000,2,FALSE))

    I need the cell contents displayed, but not if it says 'Not Available'. Preferably without repeating the entire VLOOKUP formula - a big file I'd like to keep small as possible.

    Cell B3 in my demo.
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: simplifying formula

    Try this...
    =IFERROR(VLOOKUP("*"&(LEFT($A3,8))&"*",$D$3:$E$40000,2,FALSE),"")

    Not really sure why you need the "*"&(LEFT($A3,8))&"*" part, but Im sure there is a reason?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: simplifying formula

    Can you try this instead?

    Please Login or Register  to view this content.
    Hope this helps!
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: simplifying formula

    Maybe just this

    =IFERROR(VLOOKUP(A3,$D$3:$E$40000,2,0),"")
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  5. #5
    Forum Contributor
    Join Date
    12-11-2013
    Location
    St Moritz, GR, Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    187

    Re: simplifying formula

    Thanks McMahobot.

    IFERROR doesn't work because the value I don't want is a string, not simply an error. "*"&(LEFT($A3,8))&"*" is important because the real document is more complicated. I'm filtering out the first eight digits, which could form only part of the cell it is searching in.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: simplifying formula

    Perhaps you need to provide a sample workbook that is more representative of your actual data, alont with what your expected answer would look like?

  7. #7
    Forum Contributor
    Join Date
    12-11-2013
    Location
    St Moritz, GR, Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    187

    Re: simplifying formula

    Not exactly, it's hard to root out everything which doesn't apply to the question. So long as there isn't confidential info.

+ 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. [SOLVED] Need help simplifying a formula if it's possible
    By SallyBV in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-26-2014, 06:45 PM
  2. Simplifying a formula
    By AColl in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-26-2014, 08:38 AM
  3. Help simplifying a formula
    By mongoose36 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-24-2013, 02:43 PM
  4. Simplifying a formula
    By neilpateluk in forum Excel General
    Replies: 3
    Last Post: 01-14-2009, 09:25 AM
  5. Simplifying my formula
    By lordfa9 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-09-2007, 05:33 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