+ Reply to Thread
Results 1 to 7 of 7

Multiple IF with VLOOKUP

  1. #1
    Registered User
    Join Date
    07-08-2016
    Location
    Milton Keynes, England
    MS-Off Ver
    2016
    Posts
    3

    Multiple IF with VLOOKUP

    Hi guys. I am creating a spreadsheet for weight loss. I am using the TODAY() function so excel knows to only look at todays figures when using VLOOKUP.

    I am trying to create a formula that says different things depending on the persons BMI. For example "You are still overweight", or "Good work, keep it up!". The problem is, I can't use multiple IF statements. I keep getting a VALUE error.

    I also want the formula to tell me to "weigh myself", if the BMI entry, and therefore the weight entry for the day, has not yet been inputted (ie the value = 0)

    Here's what I have so far:

    =IF(VLOOKUP(TODAY(),A2:D500,4,TRUE)>30,"You Are Still Obese!!","Getting there! Keep it up!!"),IF(VLOOKUP(TODAY(),A2:D500,4,TRUE)=0,"Weight yourself!")


    So this above formula gives me a #VALUE error, but is saying "Look at today's BMI. If its over 30, it will say "you are still obese". If its under 30, then it will say "getting there, keep it up!"". I want a range of numbers such as between 25-30 saying "Good work, keep it up!", and 30+ saying "You are still obese", with a value of 0 giving a return of "Weigh yourself!", so essentially i need 3 different possible values (0, 25-30, and >30)

    I hope this makes sense and really hope somebody can help me. I've been racking my brain all night!!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,704

    Re: Multiple IF with VLOOKUP

    You need to build a nested if statement. Here is a tutorial on it.

    http://www.techonthenet.com/excel/fo.../if_nested.php
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    07-08-2016
    Location
    USA
    MS-Off Ver
    Office 365, Office 2016 for PC & Mac, Office 2013, Office 2011 Mac
    Posts
    80

    Re: Multiple IF with VLOOKUP

    I attached a solution. Let me know if it doesn't work.
    Attached Files Attached Files

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

    Re: Multiple IF with VLOOKUP

    Try

    =LOOKUP(VLOOKUP(TODAY(),A2:D500,4,TRUE),{0,25,31},{"Weigh yourself", "Good Work", "You are still obese"})

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,704

    Re: Multiple IF with VLOOKUP

    @dmg2016

    Sorry for off-topic interjection:

    Although there is no official rule regarding this behavior, we request that wherever possible both the question AND the answer be provided in substantive detail here within the thread. An attached workbook is an excellent aid for posing a question and offering a solution, but solely doing that with no in thread explanation makes it difficult for researchers to understand or consider the Q & A of this thread without downloading what may be a pointless doc to them, if they can do that at all. Doing that also hides the content from search engines so others may never benefit from this.

    I'm sure you understand, and we look forward to seeing you post your formulas/macros in your posts for the searching benefit of all.

    Thanks again for all your hard work here!

  6. #6
    Registered User
    Join Date
    07-08-2016
    Location
    Milton Keynes, England
    MS-Off Ver
    2016
    Posts
    3

    Re: Multiple IF with VLOOKUP

    Thanks for this. It works to an extent. How does this formula work? I'd like to be able to understand it fully.

  7. #7
    Registered User
    Join Date
    07-08-2016
    Location
    Milton Keynes, England
    MS-Off Ver
    2016
    Posts
    3

    Re: Multiple IF with VLOOKUP

    This seems to work. Thanks very much. Do the {} symbols mean that you used an array in this formula? Seems much more simple than other suggestions I've seen!

+ 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. [SOLVED] iserror and vlookup with multiple criteria from multiple tables along with concatenation.
    By marcusduton in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-14-2015, 02:16 AM
  2. Help using vlookup to return multiple results for one vlookup value
    By Akmon in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-27-2015, 06:00 AM
  3. [SOLVED]How to VLookup multiple items when the source has multiple identical numbers
    By jackson_hollon in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-17-2014, 12:56 AM
  4. [SOLVED] VLookup - Single value lookup returning multiple records into multiple columns
    By kllovin in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-07-2014, 05:14 AM
  5. Vlookup function to return multiple values from multiple sheets
    By bsamant in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-13-2013, 11:31 AM
  6. vlookup? match? index? MULTIPLE criteria for vlookup search problem....
    By aborg88 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-11-2013, 09:56 AM
  7. Multiple Row Match (VLOOKUP Extended) to find Multiple Rows
    By Niper in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-24-2011, 10:58 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