+ Reply to Thread
Results 1 to 29 of 29

How to nest vlookup into ifs function?

  1. #1
    Registered User
    Join Date
    10-23-2018
    Location
    SW Florida
    MS-Off Ver
    Office 365
    Posts
    17

    How to nest vlookup into ifs function?

    I am trying to get a return value in cell E2 when a value of 1,2 or 3 is entered into cell D2. I am trying to use the "IFS" function to grab a Here is a snip of this table.

    Capture.PNG

    I fetched the value in cell E2 from the the table below.

    Capture 3.PNG

    I am trying to embed vlookup into the ifs function to get the appropriate cost/unit rate when 1, 2 or 3 is entered into cell D2

    The vlookup is =VLOOKUP(B2,'Cost Data'!$B$3:$J$40,6,FALSE)

    Please help.

    Thanks
    - Mike
    Attached Images Attached Images
    Last edited by 6StringJazzer; 10-23-2018 at 10:33 PM. Reason: moved from Tips and Tutorials

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: How to nest vlookup into ifs function?

    IFS is not the right tool for this. What you are trying to do is match a row based on values in two columns.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    This is an array formula. After typing in the formula, do not hit ENTER--hit CTRL+SHIFT+ENTER. You have done it correctly if the formula in the formula box has {braces} around it. You cannot type in the braces; they are just an indicator that it is an array formula.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    10-23-2018
    Location
    SW Florida
    MS-Off Ver
    Office 365
    Posts
    17

    Re: How to nest vlookup into ifs function?

    I followed your instruction. Put the formula into the E2 cell and a value error is returned.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,396

    Re: How to nest vlookup into ifs function?

    Attach the workbook for troubleshooting.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    10-23-2018
    Location
    SW Florida
    MS-Off Ver
    Office 365
    Posts
    17

    Re: How to nest vlookup into ifs function?

    OK. File is in uploads.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,396

    Re: How to nest vlookup into ifs function?

    No file attached - please follow the instructions in my previous post.

  7. #7
    Registered User
    Join Date
    10-23-2018
    Location
    SW Florida
    MS-Off Ver
    Office 365
    Posts
    17

    Re: How to nest vlookup into ifs function?

    xlsx.gif Ette Hotel Takeoff Workbook.xlsx (72.7 KB)
    Attached Files Attached Files

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,396

    Re: How to nest vlookup into ifs function?

    Thank you.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,396

    Re: How to nest vlookup into ifs function?

    Is this what you want?

    =INDEX('Cost Data'!$G$3:$G$40,MATCH(B2,'Cost Data'!$B$3:$B$40,0))*D2

    Ordinary formula.

  10. #10
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: How to nest vlookup into ifs function?

    Ali, the search needs to match both "area" and "cts" (as labeled in the first table in the first post); the formula immediately above matches only "area".

    My formula had an error. The correct formula is

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    which is still an array formula as described above. In your sample file in sheet Proposal, you are using PTD Int Wd Trim and 2. This combination does not exist in Cost Data so there is a #N/A result.

  11. #11
    Registered User
    Join Date
    10-23-2018
    Location
    SW Florida
    MS-Off Ver
    Office 365
    Posts
    17

    Re: How to nest vlookup into ifs function?

    Thank you AliGW

  12. #12
    Registered User
    Join Date
    10-23-2018
    Location
    SW Florida
    MS-Off Ver
    Office 365
    Posts
    17

    Re: How to nest vlookup into ifs function?

    Thank you 6StringJazzer.

    BTW. I am a keys and bass player...Love me some Return to Forever

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,396

    Re: How to nest vlookup into ifs function?

    No problem.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  14. #14
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: How to nest vlookup into ifs function?

    Quote Originally Posted by Mike Warren View Post
    BTW. I am a keys and bass player...Love me some Return to Forever
    Sweet. I play Spain and Got A Match. I saw Return to Forever back in around 1980 in Ann Arbor, Mich. Incredible show. Only time I've ever seen Chick. (Most people are surprised that as a guitar player I am not an Al Dimeola fan.)

  15. #15
    Registered User
    Join Date
    10-23-2018
    Location
    SW Florida
    MS-Off Ver
    Office 365
    Posts
    17

    Re: How to nest vlookup into ifs function?

    Hi again.

    Unfortunately the muliplier of D2 at the end only multiplies Cost Data cell G3 on Sheet Cost Data by a factor of 3, which is inaccurate.

    xlsx.gif Ette Hotel Takeoff Workbook.xlsx (97.8 KB)

    Also. Can something be added that will return a "0" in the Rate/Unit column of the recap sheet if a cell in the Area Item column is left blank?

    Thank you
    Attached Files Attached Files

  16. #16
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,607

    Re: How to nest vlookup into ifs function?

    I believe that the issue is two fold.
    1) Use Jeff's array entered formula from post #10 (modifying so that it is matching the Area Item in A7 and No. of Coats in D7)
    2) In File > Options > Formulas > Calculation options, make sure that Automatic is selected (Manual is selected when file attached to post #15 is opened).
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  17. #17
    Registered User
    Join Date
    10-30-2018
    Location
    London
    MS-Off Ver
    excel 2010
    Posts
    53

    Re: How to nest vlookup into ifs function?

    Hi there Mike,

    Just incase you still need the solution to your problem, try the formula below

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    i believe that meets your requirements and also avoids the use of arrays in the function.
    hope it helps
    I just joined the forum and could do with a mark up if there are any on offer hahaha.
    Please confirm it works.
    thanks in advance.
    good luck!

  18. #18
    Registered User
    Join Date
    10-30-2018
    Location
    London
    MS-Off Ver
    excel 2010
    Posts
    53

    Re: How to nest vlookup into ifs function?

    Theres your reworked file attached.
    ps.on open of file, go to formulas tab, calculation options, select auto calculate.
    regards
    Attached Files Attached Files

  19. #19
    Registered User
    Join Date
    10-23-2018
    Location
    SW Florida
    MS-Off Ver
    Office 365
    Posts
    17

    Re: How to nest vlookup into ifs function?

    Hello Brian.
    Thank you. Unfortunately it does not correctly calculate if 2 or 3 coats is selected.

  20. #20
    Registered User
    Join Date
    10-30-2018
    Location
    London
    MS-Off Ver
    excel 2010
    Posts
    53

    Re: How to nest vlookup into ifs function?

    Hi Mike
    with your Vlookup function below:

    The vlookup is =VLOOKUP(B2,'Cost Data'!$B$3:$J$40,6,FALSE) ( you posted above)

    it breaks a rule that i believe may affect your results. (you have duplicate names)

    vlookup rule:
    If the lookup_value is duplicated in the left-hand column of the table_array, the function uses the first match that it encounters.

    can i please ask what was the result you expected from the formula a gave you in order for me to make adjustments.

  21. #21
    Registered User
    Join Date
    10-23-2018
    Location
    SW Florida
    MS-Off Ver
    Office 365
    Posts
    17

    Re: How to nest vlookup into ifs function?

    Here is the most current workbook.

    Ette Hotel Takeoff Workbook (4).xlsx

    For the vlookup formula, do I need to use column A ("Work Code")on the cost data table instead of the descriptive items?
    Attached Files Attached Files

  22. #22
    Registered User
    Join Date
    10-23-2018
    Location
    SW Florida
    MS-Off Ver
    Office 365
    Posts
    17

    Re: How to nest vlookup into ifs function?

    The results I need would be the hrs/unit in column G of the Cost Data table

  23. #23
    Registered User
    Join Date
    10-30-2018
    Location
    London
    MS-Off Ver
    excel 2010
    Posts
    53

    Re: How to nest vlookup into ifs function?

    if you are asking if you must use the first column for a vlookup to work, the answer is no. BUT, whatever column you choose to base your lookup value on , must also be the first column of the lookup array.
    if youre asking with regard to having duplicate values, then it is always wise to use a column with distinct values as your lookup or lookup array.

    so if works has unique values for all products that in the future will never be duplicated for say, a different product. i would go with the works column.
    it would act as a barcode (primary key).
    you can also concatenate the works column with the description column giving a 2 column key.

    i hope this helps
    Last edited by Brian Itotia; 11-01-2018 at 09:41 AM.

  24. #24
    Registered User
    Join Date
    10-23-2018
    Location
    SW Florida
    MS-Off Ver
    Office 365
    Posts
    17

    Re: How to nest vlookup into ifs function?

    OK. I will play with it and see what happens. I am a excel hobbyist at best. Thank you for help and suggestions

  25. #25
    Registered User
    Join Date
    10-30-2018
    Location
    London
    MS-Off Ver
    excel 2010
    Posts
    53

    Re: How to nest vlookup into ifs function?

    are you still multiplying this result(cost data, column G ) by the number of coats selected on the Recap sheet column D?
    alternatively, do you only want to lookup what the hrs/unit in column G of cost data sheet and ensure it aligns with the number of coats chosen?

    multiply labor rate * no of coats (exsisting formula in workbook you just sent)
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    if its just a lookup of the labor rate dependent on no of coats chosen (same formula as above - the "*$D9" at the end). it also does your if check.


    =IF($A$7:$A$200="",0,INDEX('Cost Data'!$G$3:$G$109,MATCH($A9&$D9,INDEX('Cost Data'!$B$3:$B$43&'Cost Data'!$C$3:$C$86,),0)))

    ps. also note the concatination i mentioned earlier in the above function. MATCH($A9&$D9. I joined the area item and the no. of coats to ensure referential integrity of formula.
    hope this helps
    Last edited by Brian Itotia; 11-01-2018 at 10:14 AM.

  26. #26
    Registered User
    Join Date
    10-23-2018
    Location
    SW Florida
    MS-Off Ver
    Office 365
    Posts
    17

    Re: How to nest vlookup into ifs function?

    yes and yes

  27. #27
    Registered User
    Join Date
    10-23-2018
    Location
    SW Florida
    MS-Off Ver
    Office 365
    Posts
    17

    Re: How to nest vlookup into ifs function?

    just FYI. The point of this is to come up with estimated hours for each area item on the recap

  28. #28
    Registered User
    Join Date
    10-23-2018
    Location
    SW Florida
    MS-Off Ver
    Office 365
    Posts
    17

    Re: How to nest vlookup into ifs function?

    But your correction of removing the multiplier took care of it. Sometimes can't see the forest for the trees. Thank you so much!

  29. #29
    Registered User
    Join Date
    10-30-2018
    Location
    London
    MS-Off Ver
    excel 2010
    Posts
    53

    Re: How to nest vlookup into ifs function?

    excellent!
    glad to have helped.

    just FYI. The point of this is to come up with estimated hours for each area item on the recap
    i think its going well.
    Pretty damn good idea too.
    good luck with it.

    ps. Mark as solved if it is.

+ 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. Can I nest a SUM function in a VLOOKUP?
    By impact in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-29-2009, 11:32 AM
  2. HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION
    By CHAIM in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 PM
  3. HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION
    By CHAIM in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  4. HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION
    By CHAIM in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 AM
  5. [SOLVED] HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION
    By CHAIM in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 04:05 AM
  6. HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION
    By CHAIM in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  7. HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION
    By CHAIM in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  8. HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION
    By CHAIM in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM

Tags for this Thread

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