+ Reply to Thread
Results 1 to 8 of 8

VLOOKUP - two criteria

  1. #1
    Registered User
    Join Date
    05-17-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    23

    VLOOKUP - two criteria

    I've created an excel calorie counter and i need some assistance to add a few functions to make it even more useful. Currently I have a drop-down food list and I use VLOOKUP to fetch the required figures (carbs, protein and fats etc) for that selected food item and the portion size in grams. I want to add an additional list thats dependant on the food list. For example if i select 'Whole Eggs' then i want the second list to show the different egg sizes, Large, X-Large, Jumbo or if i select 'Apple' then i want the second list to to show, small, medium, large or if i select 'milk' then the second list to show cups, millilitres etc. I know how to create a dependant list, however my issue is setting up the required table/s to fetch the required figures. How would i go about doing this? I've attached the file on here. Any assistance is appreciated!
    Attached Files Attached Files
    Last edited by erahi; 09-15-2012 at 06:43 AM.

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: VLOOKUP - two criteria

    Something on these lines perhaps..

    =SUMPRODUCT(--(Foodlist=FoodSelected),--(SizeList=SizeSelected),(Carbs))
    =SUMPRODUCT(--(Foodlist=FoodSelected),--(SizeList=SizeSelected),(Protein))
    =SUMPRODUCT(--(Foodlist=FoodSelected),--(SizeList=SizeSelected),(Fats))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    05-17-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: VLOOKUP - two criteria

    Wouldnt you use vlookup ??

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: VLOOKUP - two criteria

    Maybe you can show us in your file the wanted results (manual inputted in a few rows).
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Registered User
    Join Date
    05-17-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: VLOOKUP - two criteria

    ive uploaded another with the results i want. Look under the 'Monday' tab. Hope this helps

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: VLOOKUP - two criteria

    Egg: Whole 2 X-Large
    Milk: Skim, Zymil, Pauls 1,5 Cups
    Fruit: Apple 1 Small


    where can we find the value 2 and x-large

    I don't see them in the file.

  7. #7
    Registered User
    Join Date
    05-17-2012
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: VLOOKUP - two criteria

    ive manually typed it up to show you what id like to see. If i select Whole egg then i want the second dependant list to show 'Jumbo, X-Large, Large' or if i select Apple then i want the second list to show 'small, medium large, etc. then id type in the portion size number 1 or 1.5 or 2 for that particular item

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: VLOOKUP - two criteria

    If you don't add the values in the sheet, i can't make a formula to find them (because, they don't exist).

    Please Login or Register  to view this content.
    You can use this to fill the sheet.

+ 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