Excel IF statement with multiple conditions

The tutorial shows how to create multiple IF statements in Excel with AND as well as OR logic. Also, you will learn how to use IF together with other Excel functions.

In the first part of our Excel IF tutorial, we looked at how to construct a simple IF statement with one condition for text, numbers, dates, blanks and non-blanks. For powerful data analysis, however, you may often need to evaluate multiple conditions at a time. The below formula examples will show you the most effective ways to do this.

How to use IF function with multiple conditions

In essence, there are two types of the IF formula with multiple criteria based on the AND / OR logic. Consequently, in the logical test of your IF formula, you should use one of these functions:

  • AND function - returns TRUE if all the conditions are met; FALSE otherwise.
  • OR function - returns TRUE if any single condition is met; FALSE otherwise.

To better illustrate the point, let's investigate some real-life formulas examples.

Excel IF statement with multiple conditions (AND logic)

The generic formula of Excel IF with two or more conditions is this:

IF(AND(condition1, condition2, …), value_if_true, value_if_false)

Translated into a human language, the formula says: If condition 1 is true AND condition 2 is true, return value_if_true; else return value_if_false.

Suppose you have a table listing the scores of two tests in columns B and C. To pass the final exam, a student must have both scores greater than 50.

For the logical test, you use the following AND statement: AND(B2>50, C2>50)

If both conditions are true, the formula will return "Pass"; if any condition is false - "Fail".

=IF(AND(B2>50, B2>50), "Pass", "Fail")

Easy, isn't it? The screenshot below proves that our Excel IF /AND formula works right: Excel IF statement with multiple AND conditions

In a similar manner, you can use the Excel IF function with multiple text conditions.

For instance, to output "Good" if both B2 and C2 are greater than 50, "Bad" otherwise, the formula is:

=IF(AND(B2="pass", C2="pass"), "Good!", "Bad") Excel IF function with multiple text conditions

Important note! The AND function checks all the conditions, even if the already tested one(s) evaluated to FALSE. Such behavior is a bit unusual since in most of programming languages, subsequent conditions are not tested if any of the previous tests has returned FALSE.

In practice, a seemingly correct IF statement may result in an error because of this specificity. For example, the below formula would return #DIV/0! ("divide by zero" error) if cell A2 is equal to 0:

=IF(AND(A2<>0, (1/A2)>0.5),"Good", "Bad")

The avoid this, you should use a nested IF function:

=IF(A2<>0, IF((1/A2)>0.5, "Good", "Bad"), "Bad")

For more information, please see IF AND formula in Excel.

Excel IF function with multiple conditions (OR logic)

To do one thing if any condition is met, otherwise do something else, use this combination of the IF and OR functions:

IF(OR(condition1, condition2, …), value_if_true, value_if_false)

The difference from the IF / AND formula discussed above is that Excel returns TRUE if any of the specified conditions is true.

So, if in the previous formula, we use OR instead of AND:

=IF(OR(B2>50, B2>50), "Pass", "Fail")

Then anyone who has more than 50 points in either exam will get "Pass" in column D. With such conditions, our students have a better chance to pass the final exam (Yvette being particularly unlucky failing by just 1 point :) Excel IF function with multiple OR conditions

Tip. In case you are creating a multiple IF statement with text and testing a value in one cell with the OR logic (i.e. a cell can be "this" or "that"), then you can build a more compact formula using an array constant.

For example, to mark a sale as "closed" if cell B2 is either "delivered" or "paid", the formula is:

=IF(OR(B2={"delivered", "paid"}), "Closed", "")

More formula examples can be found in Excel IF OR function.

IF with multiple AND & OR statements

If your task requires evaluating several sets of multiple conditions, you will have to utilize both AND & OR functions at a time.

In our sample table, suppose you have the following criteria for checking the exam results:

  • Condition 1: exam1>50 and exam2>50
  • Condition 2: exam1>40 and exam2>60

If either of the conditions is met, the final exam is deemed passed.

At first sight, the formula seems a little tricky, but in fact it is not! You just express each of the above conditions as an AND statement and nest them in the OR function (since it's not necessary to meet both conditions, either will suffice):

OR(AND(B2>50, C2>50), AND(B2>40, C2>60)

Then, use the OR function for the logical test of IF and supply the desired value_if_true and value_if_false values. As the result, you get the following IF formula with multiple AND / OR conditions:

=IF(OR(AND(B2>50, C2>50), AND(B2>40, C2>60), "Pass", "Fail")

The screenshot below indicates that we've done the formula right: IF with multiple AND & OR statements

Naturally, you are not limited to using only two AND/OR functions in your IF formulas. You can use as many of them as your business logic requires, provided that:

  • In Excel 2007 and higher, you have no more than 255 arguments, and the total length of the IF formula does not exceed 8,192 characters.
  • In Excel 2003 and lower, there are no more than 30 arguments, and the total length of your IF formula does not exceed 1,024 characters.

Nested IF statement to check multiple logical tests

If you want to evaluate multiple logical tests within a single formula, then you can nest several functions one into another. Such functions are called nested IF functions. They prove particularly useful when you wish to return different values depending on the logical tests' results.

Here's a typical example: suppose you want to qualify the students' achievements as "Good", "Satisfactory" and "Poor" based on the following scores:

  • Good: 60 or more (>=60)
  • Satisfactory: between 40 and 60 (>40 and <60)
  • Poor: 40 or less (<=40)

Before writing a formula, consider the order of functions you are going to nest. Excel will evaluate the logical tests in the order they appear in the formula. Once a condition evaluates to TRUE, the subsequent conditions are not tested, meaning the formula stops after the first TRUE result.

In our case, the functions are arranged from largest to smallest:

=IF(B2>=60, "Good", IF(B2>40, "Satisfactory", "Poor"))

Naturally, you can nest more functions if needed (up to 64 in modern versions). Nested IF statement in Excel

For more information, please see How to use multiple nested IF statements in Excel.

Excel IF array formula with multiple conditions

Another way to get an Excel IF to test multiple conditions is by using an array formula.

To evaluate conditions with the AND logic, use the asterisk:

IF(condition1) * (condition2) * …, value_if_true, value_if_false)

To test conditions with the OR logic, use the plus sign:

IF(condition1) + (condition2) + …, value_if_true, value_if_false)

To complete an array formula correctly, press the Ctrl + Shift + Enter keys together. In Excel 365 and Excel 2021, this also works as a regular formula due to support for dynamic arrays.

For example, to get "Pass" if both B2 and C2 are greater than 50, the formula is:

=IF((B2>50) * (C2>50), "Pass", "Fail") IF array formula with multiple AND conditions

In my Excel 365, a normal formula works just fine (as you can see in the screenshots above). In Excel 2019 and lower, remember to make it an array formula by using the Ctrl + Shift + Enter shortcut.

To evaluate multiple conditions with the OR logic, the formula is:

=IF((B2>50) + (C2>50), "Pass", "Fail") IF array formula with multiple OR conditions

Using IF together with other functions

This section explains how to use IF in combination with other Excel functions and what benefits this gives to you.

Example 1. If #N/A error in VLOOKUP

When VLOOKUP or other lookup function cannot find something, it returns a #N/A error. To make your tables look nicer, you can return zero, blank, or specific text if #N/A. For this, use this generic formula:

IF(ISNA(VLOOKUP(…)), value_if_na, VLOOKUP(…))

For example:

If #N/A return 0:

If the lookup value in E1 is not found, the formula returns zero.

=IF(ISNA(VLOOKUP(E1, A2:B10, 2,FALSE )), 0, VLOOKUP(E1, A2:B10, 2, FALSE))

If #N/A return blank:

If the lookup value is not found, the formula returns nothing (an empty string).

=IF(ISNA(VLOOKUP(E1, A2:B10, 2,FALSE )), "", VLOOKUP(E1, A2:B10, 2, FALSE))

If #N/A return certain text:

If the lookup value is not found, the formula returns specific text.

=IF(ISNA(VLOOKUP(E1, A2:B10, 2,FALSE )), "Not found", VLOOKUP(E1, A2:B10, 2, FALSE)) If #N/A error in VLOOKUP

For more formula examples, please see VLOOKUP with IF statement in Excel.

Example 2. IF with SUM, AVERAGE, MIN and MAX functions

To sum cell values based on certain criteria, Excel provides the SUMIF and SUMIFS functions.

In some situations, your business logic may require including the SUM function in the logical test of IF. For example, to return different text labels depending on the sum of the values in B2 and C2, the formula is:

=IF(SUM(B2:C2)>130, "Good", IF(SUM(B2:C2)>110, "Satisfactory", "Poor"))

If the sum is greater than 130, the result is "good"; if greater than 110 – "satisfactory', if 110 or lower – "poor". Using the IF function with SUM

In a similar fashion, you can embed the AVERAGE function in the logical test of IF and return different labels based on the average score:

=IF(AVERAGE(B2:C2)>65, "Good", IF(AVERAGE(B2:C2)>55, "Satisfactory", "Poor"))

Assuming the total score is in column D, you can identify the highest and lowest values with the help of the MAX and MIN functions:

=IF(D2=MAX($D$2:$D$10), "Best result", "")

=IF(D2=MAX($D$2:$D$10), "Best result", "")

To have both labels in one column, nest the above functions one into another:

=IF(D2=MAX($D$2:$D$10), "Best result", IF(D2=MIN($D$2:$D$10), "Worst result", "")) Using IF together with the MIN and MAX functions

Likewise, you can use IF together with your custom functions. For example, you can combine it with GetCellColor or GetCellFontColor to return different results based on a cell color.

In addition, Excel provides a number of functions to calculate data based on conditions. For detailed formula examples, please check out the following tutorials:

  • COUNTIF - count cells that meet a condition
  • COUNTIFS - count cells with multiple criteria
  • SUMIF - conditionally sum cells
  • SUMIFS - sum cells with multiple criteria

Example 3. IF with ISNUMBER, ISTEXT and ISBLANK

To identify text, numbers and blank cells, Microsoft Excel provides special functions such as ISTEXT, ISNUMBER and ISBLANK. By placing them in the logical tests of three nested IF statements, you can identify all different data types in one go:

=IF(ISTEXT(A2), "Text", IF(ISNUMBER(A2), "Number", IF(ISBLANK(A2), "Blank", ""))) IF with ISNUMBER, ISTEXT and ISBLANK

Example 4. IF and CONCATENATE

To output the result of IF and some text into one cell, use the CONCATENATE or CONCAT (in Excel 2016 - 365) and IF functions together. For example:

=CONCATENATE("You performed ", IF(B1>100,"fantastic!", IF(B1>50, "well", "poor")))

=CONCAT("You performed ", IF(B1>100,"fantastic!", IF(B1>50, "well", "poor")))

Looking at the screenshot below, you'll hardly need any explanation of what the formula does: Using IF and CONCATENATE

IF ISERROR / ISNA formula in Excel

The modern versions of Excel have special functions to trap errors and replace them with another calculation or predefined value - IFERROR (in Excel 2007 and later) and IFNA (in Excel 2013 and later). In earlier Excel versions, you can use the IF ISERROR and IF ISNA combinations instead.

The difference is that IFERROR and ISERROR handle all possible Excel errors, including #VALUE!, #N/A, #NAME?, #REF!, #NUM!, #DIV/0!, and #NULL!. While IFNA and ISNA specialize solely in #N/A errors.

For example, to replace the "divide by zero" error (#DIV/0!) with your custom text, you can use the following formula:

=IF(ISERROR(A2/B2), "N/A", A2/B2) Using IF together with ISERROR

And that's all I have to say about using the IF function in Excel. I thank you for reading and hope to see you on our blog next week!

Practice workbook for download

Excel IF multiple criteria - examples (.xlsx file)

4538 comments

  1. I have a number that i want to find if it is available in a table of ranges then give me range index of the number
    ex:
    if i have a number 76 i want a formula to check number 76 in the below table and brings me the index =2
    if i have a number 211 i want a formula to check number 211 in the below table and brings me the index =4
    table of ranges
    1 1 to 69
    2 70 to 138
    3 139 to 207
    4 208 to 276
    5 2277 to 345

  2. Hi,
    Thank for such a great post!! and quick response for other!!

    Can you please help me!!
    My Logics are: 0+0=A, 0+1=B, 1+0=C, 1+1=D.

    I Tried with this, =IF(AND(I2="",J2=""),"A",IF(AND(I2="",J2=""),"B",IF(AND(I2="",J2=""),"C","D")))
    But this shows only A or D !!

    Thanks in advance.

    **Please ignore my previous post.

    • Hello!
      If I got you right, the formula below will help you with your task:

      =IF(AND(I2="",J2=""),"A",IF(AND(I2="",J2 < > ""),"B",IF(AND(I2 < > "",J2=""),"C","D")))

      I hope it’ll be helpful.

  3. Hello all,
    I have the current formula
    =IF(AND(I32>=$O$32,ABS(J32)= 1 hour and cell J32 <=.125 inches than I get a passing result. I am trying to add another condition onto this formula in that if cell J32<= .002 at any time I would also get a passing result. Any help would be greatly appreciated

    • Hello!
      If I got you right:

      =IF(AND(I32>=$O$32,ABS(J32)= 1,J32 < = 0.125,J32 < = 0.002),TRUE,FALSE)

      I don’t think this formula will work as the conditions ABS(J32)= 1,J32 < = 0.125,J32 < = 0.002 contradict each other. They cannot be executed at the same time.

      • Cheers! I did have the incorrect formula written in my first comment. The correct formula is:
        =IF(AND(I32>=$O$32,ABS(J32)<=0.125),"Pass", "Fail")
        From here I was looking to add another condition onto this formula in that if cell J32<= .002 at any time I would also get a passing result. Apologies for the typo in the first question. I will see if I can implement your reply but more help in the matter would be fantastic.

        • Hi,
          Please try the following formula:

          =IF(OR( J32<= 0.002,AND(I32>=$O$32,ABS(J32)<=0.125)),"Pass", "Fail")

          Hope this is what you need.

  4. Hello everyone,

    Could you please check my formula?

    =IF(F2>=5000 & G2>=10%,"5%",IF(F2>=5000 & G2<10%,"3%",IF(F2<5000 & G2<10%,"10%",IF(F2=10%,"4%"))))

    So what I am trying to do is basically puting 2 conditions for 1 result. I will call the ensemble of these 2 conditions "Super condition", which in this case are 4 "super conditions".

    After including the formula, it gives me only one result, which is 5% no matter how much I change the values in the super condition.

    Can any one support regarding this matter, it would be most helpful!

    With my best regards,

    • Hello!
      Your formula has the wrong AND condition. See Example 1 above.

      =IF(AND(F2>=5000, G2>=10%),"5%",IF(AND(F2>=5000,G2<10%),"3%",IF(AND(F2<5000,G2<10%),"10%",IF(F2=10%,"4%",""))))

      • You are a Godsend, thank you very much!

  5. I created the following formula based on the tutorial above. While the formula appears to work, I am unable to sum the results. I wasn't able to fix this by changing the formatting - it's already set to numbers. Any idea why this isn't working?

    =IF(A1>=30, "1.0", IF(A1>=10, ".5", IF(A1= 10-29, result should be .5
    A1>= 30, result should be 1.0

    Once I get the result, I then need to be able to sum the column for all values.

    • I created the following formula based on the tutorial above. While the formula appears to work, I am unable to sum the results. I wasn't able to fix this by changing the formatting - it's already set to numbers. Any idea why this isn't working?

      =IF(A1>=30, "1.0", IF(A1>=10, ".5", IF(A1<10, "0")))

      A1= 30, result should be 1.0

      Once I get the result, I then need to be able to sum the column for all values.

      I tried to submit this once already, but when it posted the details jumbled together - trying again.

    • Hello!
      To perform calculations on the results of your formula, it must return a number, not text.

      =IF(A1 > = 30, 1, IF(A1 > = 10, 0.5, IF(A1<10, 0)))

      I hope it’ll be helpful.

  6. =IF(E2>=70, "Excellent", IF(E2>=60, "Good", IF(E2>40, "Satisfactory", "Poor ")))

    This formula doesn't work as is stated. How to make it work if you have logic text and column true and false. For example:
    Logic: E2>=70
    True: "Excellent"
    False: "Poor"

    How to insert other variables to work?

    • Hi,
      The formula you wrote works. But if I understood correctly, a different formula is needed for your conditions.

      =IF(E2 >= 70,"Excellent","Poor ")

      Hope this is what you need.

  7. Trying to do the following:

    If text in A1:A30 = "Apples" then take number in B1:B30 and divide by 2. below is what i am trying to make it look like. Probably pretty easy for some but i am a rookie

    column A Column B Column C
    Apples 5000 2500

  8. I have situation in which. If Requirement is greater than a Packaging standard then it should return value as per PAckaging standard. Ex - if requirement is 19 Kg and Packaging standard is of 6Kg then return value should be 24 KG.

    Another Example - If Requirement is of 17 Kg & Packaging standard is of 4 KG then return value should be 20 KG.

    Plz help me to apply this formula

  9. Can i do a formula for this?
    Tally all the dollar amount in column O lines 2 through 50
    But Only if there is a Y (for yes) in column V on each line
    If there is a N (for no) in column V its not included in the grand total

      • Thank you for the link. I still cant figure it out. Those all seem to just give me a tally of numbers. I need a sum of the amounts. So in Column O i have 50 lines of salaries. In Column V i have 50 lines of either Y or N ( for yes or no). I want to be able to get the dollar amount total in Column O only if there is a Y in column V. The COUNTIF formula was only giving me the number of Y's i had in column V.
        That way i can see the grand total dollar amount update if i change the Y to an N or vice versa.

  10. Good day
    The second cell as my reference cell to my third cell has already formula, the formula is =IFERROR(C14/$C$13,0)*100 and displays nothing. The formula of the third cell is =IF(OR(D14=""),"",IF(D14>83.99,"O",IF(D14>75.99,"VS",IF(D14>67.99,"S",IF(D14>59.99,"FS",IF(D14<=59.99,"DNME","")))))) , but still the DNME will display. I want it to display nothing if the cell has no entry

    Please help me.. Thank you

    • Hello!
      I assume that you have some non-printable character written in cell D14. Copy the formula onto a new blank worksheet and test it there.

  11. What if i have 2 worksheets ( A and B). Worksheet A has a lot of data with various columns but in column A there are unique codes. Worksheet B has a few items all taken from worksheet A. Worksheet B also has the unique codes in column A (the same codes as worksheet A). i want to do a statement where it shows the following: if the unique code in worksheet B is he same as worksheet A and if column O in worksheet A has a date in it on the same row as the specified unique code then say YES in column H on worksheet B, if it does not have a date in it then say NO.

    • Hello!
      If I understand your task correctly, the following formula should work for you:

      =IF(IFERROR(DAY(CELL("contents",INDEX(Sheet1!$O$1:$O$30,MATCH(A1,Sheet1!$A$1:$A$30,0)))),0)>0,"Yes","No")

      I hope this will help, otherwise please do not hesitate to contact me anytime.

  12. 2.8
    3.1
    5.0
    5.8
    5.0
    2.0
    2.8
    3.1

    HI SIR HOE CAN I CALCULATE % OF 5.0 DATA IN COLOUM

  13. I am trying to write an excel formula which can be dragged across a row of cells to give the number of days in each month between two specified dates.
    A B C D E F

    1 | START DATE | END DATE | Jan | Feb | Mar | Apr ...etc |Location
    ---------------------------------------------------------
    2 | 01/26/20 | 10/30/20 | 0 | 19 | 15 | 0 |Mexico
    3 | 07/15/20 | 12/03/20 | 0 | 19 | 15 | 0 |United States

    Also, i have location specific holiday list to be excluded in this calculation. Now i am using the below formula to drive the days. But i can't change the holiday list based on Location column. I am expecting the holiday list to be chosen based on the value in the location column.

    =MAX(0,NETWORKDAYS(MAX(D$5,$B6),MIN(DATE(YEAR(D$5),MONTH(D$5)+1,0),$C6),$T$1:$T$20))

    Holiday List seems to be as below.
    United States Mexico
    1/1/2021 7/5/2021
    2/15/2021 9/6/2021
    5/31/2021 11/11/2021

    • Hello!
      You can use IF function:

      =IF(F5="Mexico",MAX(0,NETWORKDAYS(MAX(D$5,$B6),MIN(DATE(YEAR(D$5),MONTH(D$5)+1,0),$C6),$T$1:$T$20)),MAX(0,NETWORKDAYS(MAX(D$5,$B6),MIN(DATE(YEAR(D$5),MONTH(D$5)+1,0),$C6),$S$1:$S$20)))

      I hope this will help, otherwise please do not hesitate to contact me anytime.

      • @Alex, thanks for your response. this is really helps. But In my case, i have a holiday list for nearly 20 regions. It's quite complicate to write if condition. Is there alternatives to perform this action?

        • Hello!
          You can use a named range in your formula.
          Create from $T$1:$T$20 named range "Mexico". Create from $S$1:$S$20 named range "United States".
          Please try the following formula:

          =MAX(0,NETWORKDAYS(MAX(D$5,$B6),MIN(DATE(YEAR(D$5),MONTH(D$5)+1,0),$C6),INDIRECT(F5)))

          If F5 contains "Mexico", then the formula INDIRECT(F5) will substitute the range $T$1:$T$20.
          I hope I answered your question. If something is still unclear, please feel free to ask.

  14. I have a list on a tab called data which has the following:
    Employee ID in cell A2, A3 ect
    Start date in cell B2, B3 ect
    End date in cell C2, C3 ect
    Leave code in cell D2, D3 ect

    Then I have a monthly calander on a tab called calander which has the following:
    Employee ID in cell A3, A4 ect
    The date in cell E2, F2 ect (i.e 1 Feb, 2 Feb)

    I want to insert a formal into the calander tab in say cell E3 which does the following: if the members employee number in A3 appears anywhere on the list on the data tab and the date in E2 falls between the dates on the date tab it returns the leave type for that date range. If that employee doesnt have a leave type in for that date then I want it to return a blank value

    Any help would be appreciated

    Thanks Lauren

    • Hello!
      If I got you right, the array formula below will help you with your task:

      =IFERROR(INDEX(Sheet2!$D$2:$D$10, MATCH(1, (calander!A3=Sheet2!A2:A10) * (calander!E2>=Sheet2!B2:B10) * (calander!E2<=Sheet2!C2:C10), 0)),"")

      This is an array formula and it needs to be entered via Ctrl + Shift + Enter, not just Enter.
      Here is the article that may be helpful to you: Excel VLOOKUP with multiple conditions
      Hope you’ll find this information helpful.

      • Thank you so much this solved my issue, I just had to make a few changes (see below) but this has caused an extra problem for me. Because I used $B:$B etc (because my list on the data tab is indefinite i.e. could have 1000 entries or could have more). I now have a really long calculation time. Is there a way to tell the formula to look at any data in those columns without using $B:$B etc?

        =IFERROR(INDEX(Data!$B:$B, MATCH(1, (Calander!$A3=Data!$A:$A) * (Calander!E$2>=Data!$C:$C) * (Calander!E$2<=Data!$D:$D), 0)),"")

  15. Trying to input 2 logical conditions with different outcomes in one column.

  16. Hi, I want to input a date range for a cell for dates starting 1 April 2020 and ending 1 December 2020 and any corresponding values will give a certain point in another cell. Example:
    =if(AB149>=Date(2020,4,1),AB149<Date(2020,12,2),IFS(AC149=“GOLD”,3,AC149=“SILVER”,2,AC149=“PASS”,1,AC149=“NOT TAKEN”,-3))

    Can’t seem to get it right. Help please

    • Hello!
      Sorry, it's not quite clear what you are trying to achieve.
      Could you please describe your task in more detail? What result do you want to get? Please specify what you were trying to find and what problem or error occurred.

  17. Please Help I want formula for following - If cell Value of A1 is lesser than or equal 1300 then multiply by 14 if great than 1300 then first 1300 is multiply by 14 and remaining value is multiply by 11
    (result shows in A2)

    Ex:- if A1 value is 1200 then in A2 cell result is 1200*14
    if A1 Value is 1310 then in A2 cell result is 1300*14 & 10*11 = Total should be 18310 (18200+110=18310)

    • Hello!
      I hope you have studied the recommendations in the tutorial above. It contains answers to your question.

      =IF(A1<=1300,A1*14,(A1-1300)*11+1300*14)

  18. Hi!
    I have cells I want to fill through conditional formatting depending on the following:
    1. If the schedule is MWF or TTS (found in column AH)
    2. The day of the week (found in row 2)

    I will have 2 formulas for conditional formatting: one for MWF, and the other for TTS.

    The cells that need filling are in C3 through AG30 (for a 31-day month).

    I tried using the formula (absolute reference excluded): =IF(AND(AH3="MWF",OR(C2="Mon",C2="Wed",C2="Fri"))), but it doesn't seem to work.

    Is there a way to use one formula for both MWF and TTS conditions?

    What can you advise? Thank you very much!

    P.S.
    If the cell is filled with some values, they should change colors, but I already have a separate conditional formatting formula for this.

      • Hi!

        Thank you for the prompt response. This works great!

        At the moment, I have 2 separate entries in the conditional formatting for MWF and TTS. Is there a way to combine both?

        Also, it works only if the entry in C$2 (and the rest of the cells in row 2) is actually "Mon", "Wed", or "Fri". if cell C2 has the formula =B$2+1 (and the rest of the cells in row 2 have a similar recursive formula), it does not work. The entries in this row are custom-formatted as "ddd" (to return 3-character days, i.e. Mon, Tue, Wed, etc.

        The formula in B2 is = A1, with A1 the first day of the month with the format mm/dd/yyyy.

        My current workaround is manually setting C2 to I2 as Mon, Tue, Wed, etc. with J2=C2, K2=D2 up to AG2=Z2, but I would like to automate this step as well so that the entire sheet is good to go when I change the entry in A1.

        I will need to research this further, but any help would be much appreciated.

        Thanks again!

        • Hi,
          The formula I sent to you was created based on the description you provided in your first request. However, as far as I can see from your second comment, your task is now different from the original one.
          Add to the OR formula the days of the week that you want. You have a sample.

          =IF(AND(OR(AH3="MWF",AH3="TTS"),OR(C2="Mon",C2="Wed",C2="Fri", C2=....,C2=....)))

          • Thank you very much for the suggestion. I will try it as soon as I can.

            Have a wonderful day!

  19. I am looking for the correct If statement:

    If C112%, 0%
    If C1>6% and <12%, C1/12%

    So the answer should return 100%,0%, or divide the %/12%

    • Sorry your formula is wrong

    • Hello!
      I hope you have studied the recommendations in the tutorial above. It contains answers to your question.
      But if you cannot solve the problem yourself, please clarify the conditions for the IF function.

  20. Guy, please let me if know the answer

Post a comment



Thank you for your comment!
When posting a question, please be very clear and concise. This will help us provide a quick and relevant solution to
your query. We cannot guarantee that we will answer every question, but we'll do our best :)