+ Reply to Thread
Results 1 to 5 of 5

nested IF formula with multiple conditions based on 2 columns

  1. #1
    Registered User
    Join Date
    01-17-2016
    Location
    Alaska
    MS-Off Ver
    MS Office 13
    Posts
    23

    nested IF formula with multiple conditions based on 2 columns

    nested IF formula with multiple conditions based on 2 columns
    this is a blood glucose sheet i am working on the values are copy pasted into a excel sheet from a csv file the meter or meter program makes.

    in column D is the blood glucose reading example ( no.s ranging from the 60's to maybe 500 ) (70 to 110 before a meal and 90 to 140 after a meal is the ideal range)

    column K is a code 7 = Before Meal and 9 = After Meal or blank when info is put in from older meter or outside sources
    column S is where i want the results to appear for conditional format and color code reasons so in order to work right the values in column S need to change as to weather Column K is blank has a 7 or a 9 as to how it figures if a no. in Column D is within target range or not


    this formula in column S now -> =IF(AND(D13>=1, D13<=69), "Low", "") & IF(AND(D13>=70, D13<=110), "Good", "") & IF(AND(D13>=111, D13<=130), "High Moderate", "") & IF(AND(D13>=131, D13<=150), "High", "") & IF(AND(D13>=151), "Bad", "")

    would work for a before meal reading if it would look into column K and put these results out if there was a 7 there . if there was 9 the range would have to change a little bit and if it were blank might just change the word in column s to know it is just not as accurate reading
    i hope i am making a little bit of sense if i can get it do just do something in (S) based on 7 or 9 in (K) with a few ranges simular to above formula i think i can figure it out i seam to be stuck
    thanks in advance for any help or pointers

  2. #2
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,412

    Re: nested IF formula with multiple conditions based on 2 columns

    Hi Beattle Juice,

    See attached example, using a lookup table for your values. In rows, the blood glucose levels. In column, before or after meal code.
    Attached Files Attached Files
    GC Excel

    If this post helps, then click the star icon (*) in the bottom left-hand corner of my post to Add reputation.

  3. #3
    Registered User
    Join Date
    01-17-2016
    Location
    Alaska
    MS-Off Ver
    MS Office 13
    Posts
    23

    Re: nested IF formula with multiple conditions based on 2 columns

    Thank you for helping but i do not understand how this formula works to modify anything i modified your sheet with the pages i am trying to fix and maybe it will help the input sheet is the sheet where everything gets copied from the csv file and the blood glucose sheet is more for looking at a cleaner look is what i was trying to make it to be i guess i am asking is there any other way ?
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,412

    Re: nested IF formula with multiple conditions based on 2 columns

    See attached file.

    I put the formula in column S.
    I change Sheet1 into a Reference sheet. You simply need to add your glucose level in column A with the output you want in B and C
    If you don't understand the formula look at the help for the INDEX and MATCH functions.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-17-2016
    Location
    Alaska
    MS-Off Ver
    MS Office 13
    Posts
    23

    Re: nested IF formula with multiple conditions based on 2 columns

    thank you so much for your effort and time i will see if i can figure it out i may have to try to change up the ( K12="","Inaccurate reading" ) part nothing on what you have done if anything it me not knowing what to do with it what it. hopefully will end up with is the readings that end up yellow mean danger low and low is more dangerous than being high well till it gets way high its just low can sneak up on a person and is caused by the medications or exorcise / work and the highs usually come from what one eats and is usually that persons fault and what not. but any ways hoping to get the colors in D all controlled by what the input copied from the csv file from the meter program to be more accurate when there is info coming from the program as to weather a person has just had a meal in 2 hrs or not which if they have makes sugars higher or should pending what they ate lol any ways it will prob take a bit to dig into it here and thank you so much again

+ 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. Nested IF formula with multiple conditions
    By DavidNg in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-27-2016, 06:24 AM
  2. Replies: 5
    Last Post: 06-21-2015, 06:42 AM
  3. Replies: 6
    Last Post: 08-20-2014, 12:14 PM
  4. Conditional Formatting Rules from multiple columns based on conditions!!!
    By vijay4b7 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-08-2014, 05:22 PM
  5. Extract Data based on conditions on multiple columns
    By checkoncomp in forum Excel General
    Replies: 6
    Last Post: 07-03-2013, 01:54 PM
  6. Nested IFs formula to find matching values with multiple conditions
    By ghuang in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-25-2009, 02:02 AM
  7. [Macro] Deleting Columns Based on Multiple Conditions
    By fixedamage in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-21-2006, 04:10 AM

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