+ Reply to Thread
Results 1 to 4 of 4

Using IF with drop down menus

  1. #1
    Registered User
    Join Date
    01-02-2014
    Location
    London, England
    MS-Off Ver
    Excel Office 365
    Posts
    2

    Using IF with drop down menus

    I'm trying to create a nutritional information tool using excel and am hoping someone can help me out with a formula that I can't seem to get right.

    On one page I have two drop down menus, one relating to activity and one relating to goals.

    The activity dropdown has five options 'Sedentary', 'Light', 'Moderate', 'Heavy' and 'Extra' and is linked to a table, which includes a calorific value, and the goal dropdown has two values 'Fat Loss' and 'Weight Gain'.

    What I am attempting to do is have a cell that combines these two options in order to provide a target for the user (which updates depending on which values are selected from the dropdown).

    So far my formula reads =IF(B2="Fat Loss", [=VLOOKUP(B1,TDEEValue,2,FALSE)-500], [=VLOOKUP(B1,TDEEValue,2,FALSE)+500])

    Where B2 is the dropdown menu with 'Fat Loss' and 'Weight Gain' as options, and B1 is the activity dropdown, linked to my table named TDEEValue (the calorific values attached are in column 2).

    I've tested the VLOOKUP function in isolation and that works fine, so the problem is obviously with the if part of my formula, I'm currently getting a 'The name that you entered is not valid' error.

    Can anyone help, or have I gone about the whole thing the wrong way?

    Thanks

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,745

    Re: Using IF with drop down menus

    =IF(B2="Fat Loss", [=VLOOKUP(B1,TDEEValue,2,FALSE)-500], [=VLOOKUP(B1,TDEEValue,2,FALSE)+500])

    i'm assuming the namesof the range/table TDEEValue is correct

    then

    =IF(B2="Fat Loss", VLOOKUP(B1,TDEEValue,2,FALSE)-500, VLOOKUP(B1,TDEEValue,2,FALSE)+500)
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    01-02-2014
    Location
    London, England
    MS-Off Ver
    Excel Office 365
    Posts
    2

    Re: Using IF with drop down menus

    So my issue was some = signs. Can't believe it was so simple! Thanks

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,745

    Re: Using IF with drop down menus

    your welcome

+ 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. Drop Down Menus
    By Viney_ in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-05-2013, 07:17 AM
  2. drop down menus
    By montanans in forum Excel General
    Replies: 1
    Last Post: 12-06-2011, 10:18 PM
  3. Replies: 2
    Last Post: 11-22-2008, 11:53 AM
  4. drop down menus
    By DMEAKIN1 in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 01-31-2007, 04:48 AM
  5. drop down menus
    By jagermeist1 in forum Excel General
    Replies: 4
    Last Post: 12-16-2005, 11:30 AM

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