+ Reply to Thread
Results 1 to 15 of 15

Multiple VLookups in on formula

  1. #1
    Forum Contributor
    Join Date
    04-18-2013
    Location
    utah
    MS-Off Ver
    2010
    Posts
    668

    Multiple VLookups in on formula

    Hi I have a report I built that has 4 shifts and depending on which shift I have chosen is which EE populate. How do I do a VLookup that looks up reporting depending on shift entered. I currently use
    HTML Code: 

    I tried
    HTML Code: 
    But thats an epic fail.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Multiple VLookups in on formula

    Hi Superchew,

    This sounds like a Choose() function to me.
    The first argument in Choose is the shift number from 1 to 4.
    The next 4 arguments are the formulas you want to use for each shift.
    Like:
    =Choose(shift Number, Formula for Shift1, Formula for Shift2, Formula for Shift3, Formula for shift4)
    When you put a 1 to 4 in "Shift Number" the correct formula will be used.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor
    Join Date
    04-18-2013
    Location
    utah
    MS-Off Ver
    2010
    Posts
    668

    Re: Multiple VLookups in on formula

    So I choose shift number from drom down so could I use
    HTML Code: 
    ?

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Multiple VLookups in on formula

    If Excel 'Shift Report'!$c$6' is a number from 1 to 4 then you would use:

    =Choose(Shift Report'!$c$6, First Formula, Second Formula, Third Formula, Forth Formula)

    You can attach your sample workbook using "Go Advanced" and then click on the Paper Clip Icon.

  5. #5
    Forum Contributor
    Join Date
    04-18-2013
    Location
    utah
    MS-Off Ver
    2010
    Posts
    668

    Re: Multiple VLookups in on formula

    The shifts are letters ABCD

    Heres how I tried to incorporate
    HTML Code: 
    Says too many agruments.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Multiple VLookups in on formula

    if the drop down is a letter then you can use =CODE('shift report'!$C$6)-64 to convert A to 1, B to 2
    its case dependent so =CODE(UPPER('shift report'!$C$6))-64 would be safer
    also
    =CHOOSE('Shift Report'!C6,VLOOKUP($A4,'A-SHIFT REPORTING'!4:35,B$1,FALSE), Formula for Shift2, Formula for Shift3, Formula for shift4)

    red ) is missing
    Last edited by martindwilson; 12-25-2014 at 12:17 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  7. #7
    Forum Contributor
    Join Date
    04-18-2013
    Location
    utah
    MS-Off Ver
    2010
    Posts
    668

    Re: Multiple VLookups in on formula

    OKAY i AM SUPER STUPID, how would I write that formula this is my current Lookup for 1 shift

    HTML Code: 

  8. #8
    Forum Contributor
    Join Date
    04-18-2013
    Location
    utah
    MS-Off Ver
    2010
    Posts
    668

    Re: Multiple VLookups in on formula

    Shift Report Zipped..zip

    I have attached workbook

  9. #9
    Forum Contributor
    Join Date
    04-18-2013
    Location
    utah
    MS-Off Ver
    2010
    Posts
    668

    Re: Multiple VLookups in on formula

    Shift Report Zipped..zipHere is the workbook

  10. #10
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Multiple VLookups in on formula

    it would look like this
    =IF($A29=0,"",CHOOSE(CODE('shift report'!$C$6)-64,VLOOKUP($A3,'A-SHIFT REPORTING'!29:60,C$1,FALSE),"vlookup 2","vlookup 3","vlookup 4"))

  11. #11
    Forum Contributor
    Join Date
    04-18-2013
    Location
    utah
    MS-Off Ver
    2010
    Posts
    668

    Re: Multiple VLookups in on formula

    AMAZING!!!!!!!!!!! Thanks for the patience and all the help. Happy Holidays.

  12. #12
    Forum Contributor
    Join Date
    04-18-2013
    Location
    utah
    MS-Off Ver
    2010
    Posts
    668

    Re: Multiple VLookups in on formula

    SOooo I thought I had it but it turns out when I change the shift the report doestn't change on the shift calculations tab doesnt change.

    I have attached if you maybe check. Also getting a circular reference alert when I change shifts.

    Shift Report.zip

  13. #13
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Multiple VLookups in on formula

    part of the formula in shift calculations b3 refers to itself
    eg
    VLOOKUP($A3,'A-SHIFT REPORTING'!$3:$35,B$3,FALSE)
    what is cell and on what sheet is B$3 supposed to be?
    Last edited by martindwilson; 12-25-2014 at 02:16 PM.

  14. #14
    Forum Contributor
    Join Date
    04-18-2013
    Location
    utah
    MS-Off Ver
    2010
    Posts
    668

    Re: Multiple VLookups in on formula

    B3 is on all the shift reporting tabs, I was using when charting to goals, but its not needed.

  15. #15
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Multiple VLookups in on formula

    well you need something in place of it it needs to be the column number you want to return from the vlookup range

+ 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. Formula with multiple IFs and VLOOKUPS, trying to add an OR!
    By drewan187 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-04-2014, 09:17 AM
  2. Formula with multiple IFs and VLOOKUPS, trying to add an OR!
    By drewan187 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-04-2014, 06:39 AM
  3. Formula with multiple IFs and VLOOKUPS, trying to add an OR!
    By drewan187 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-04-2014, 06:26 AM
  4. [SOLVED] Returning False with multiple Vlookups while completing formula in others
    By silvenmyst in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-27-2012, 10:18 AM
  5. Formula to add multiple vlookups
    By RAH in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-11-2008, 12:46 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