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