+ Reply to Thread
Results 1 to 8 of 8

Multiple Vlookup - must be an easier formula?

Hybrid View

  1. #1
    Registered User
    Join Date
    09-30-2014
    Location
    Isle of Wight UK
    MS-Off Ver
    2010
    Posts
    4

    Multiple Vlookup - must be an easier formula?

    Hi all, the attached file contains a monster of a formula which is hard to edit....and will be even harder to edit by the person I hand over my work to.
    The Green areas contain the formula.
    There must be a way of using the Braces {} but I have tried every which way---failed.

    Here is the formula, but there are more notes in the file.
    No macro's allowed (Client rules).

    =IFERROR(IF(OR(VLOOKUP(M10,$C$10:$H$35,2,0)="rr2",VLOOKUP(M10,$C$10:$H$35,3,0)="rr2",VLOOKUP(M10,$C$10:$H$35,3,0)="rr2",VLOOKUP(M10,$C$10:$H$35,4,0)="rr2",VLOOKUP(M10,$C$10:$H$35,5,0)="rr2",VLOOKUP(M10,$C$10:$H$35,6,0)="rr2"),"yes","No"),"Non")
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    03-17-2005
    Location
    Canterbury, Kent
    MS-Off Ver
    2003, 2010
    Posts
    285

    Re: Multiple Vlookup - must be an easier formula?

    Place the RR2 & RR5 in cells A1 & B1. Make them named ranges such as Code1 & Code2.

    Then reference them in the formula. Then if you need to change them you only need to change the contents of cells A1 & B1

    Your code would look something like =IF(OR(VLOOKUP(M10,$C$10:$H$35,2,0)=Code1,VLOOKUP(M10,$C$10:$H$35,3,0)=Code1,VLOOKUP(M10,$C$10:$H$35,3,0)=Code1,VLOOKUP(M10,$C$10:$H$35,4,0)=Code1,VLOOKUP(M10,$C$10:$H$35,5,0)=Code1,VLOOKUP(M10,$C$10:$H$35,6,0)=Code1),"yes","No")

    Just change Code1 for Code2

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Multiple Vlookup - must be an easier formula?

    Try this

    =IFERROR(IF(SUMPRODUCT(--(VLOOKUP($M10,$C$10:$H$35,{2,3,4,5,6},0)=O$8))>0,"Yes","No"),"Non")

    Note, I used the cell reference O8 for rr2

  4. #4
    Registered User
    Join Date
    09-30-2014
    Location
    Isle of Wight UK
    MS-Off Ver
    2010
    Posts
    4

    Re: Multiple Vlookup - must be an easier formula?

    Windy58, many thanks but........didn't try that because the formula you presented didn't look a lot different from my howling big thing.

    Jonmo1, yes, this works!!!
    I will try it at work next week on the full "Active" list(s). The double dash (--). What is that doing, what is it saying?

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Multiple Vlookup - must be an easier formula?

    The -- converts True/False results into 1/0
    True = 1
    False = 0

    So it creates 5 vlookups (1 for each col index 2 - 6)
    And asks if each one = O8, true or false.
    Then the -- converts the true/false to 1/0
    Sumproduct sums the 5 1's or 0's

  6. #6
    Registered User
    Join Date
    09-30-2014
    Location
    Isle of Wight UK
    MS-Off Ver
    2010
    Posts
    4

    Re: Multiple Vlookup - must be an easier formula?

    Quote Originally Posted by Jonmo1 View Post
    The -- converts True/False results into 1/0
    True = 1
    False = 0

    So it creates 5 vlookups (1 for each col index 2 - 6)
    And asks if each one = O8, true or false.
    Then the -- converts the true/false to 1/0
    Sumproduct sums the 5 1's or 0's
    Many thanks indeed.

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Multiple Vlookup - must be an easier formula?

    You're welcome.

  8. #8
    Registered User
    Join Date
    09-30-2014
    Location
    Isle of Wight UK
    MS-Off Ver
    2010
    Posts
    4

    Re: Multiple Vlookup - must be an easier formula?

    Just to close........I put the new formula in 3 columns of the actual worksheet. File size went from 16,376kb to 15,770kb.
    There are 26 columns!
    Not altered processing speed though (Not that I can determine). The whole work book is formulae. It's taking 1 to 2 seconds at each data entry at present. Don't really want to remove the automatic calculation just yet though. Will keep simplifying the formula's like this.
    It doesn't seem to be computer power as the limitation of calculation speed. I am at home at present, with the file on a gamer spec machine (Significantly better CPU etc. than those at work), and the speed is hardly improved.

+ 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. Easier way to write down this formula
    By a1b2c3d4e5f6g7 in forum Excel General
    Replies: 13
    Last Post: 06-25-2014, 06:46 AM
  2. Is there any easier way to do this formula?
    By Ms. P in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-27-2005, 02:05 AM
  3. [SOLVED] Need a formula that would make life easier
    By frustrated in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 05-29-2005, 12:05 PM
  4. [SOLVED] Need a formula that would make life easier
    By Frustrated in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-29-2005, 10:05 AM
  5. Multiple If's has got to be easier ....
    By shikamikamoomoo in forum Excel General
    Replies: 2
    Last Post: 03-25-2005, 03:22 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