IF condition in Excel

vbimport

#1

Please tell me how to write a query in MS Excel with IF condition to get the following result

If C1>=80 THAN PRINT EX
If C1>=65 AND C1<=79 THAN PRINT A
If C1>=50 AND C1<=64 THAN PRINT B
If C1>=35 AND C1<=49 THAN PRINT C
If C1<35 THAN PRINT F

and in case if result if F than change the color of F into RED


#2

Use the following formula in the cell:

=IF(C1>=80;“EX”;IF(C1>=65;“A”;IF(C1>=50;“B”;IF(C1>=35;“C”;“F”))))

Depending on regional settings (country), you may have to use commas instead of semicolons in the formula.

Then use Conditional Formatting in the Format menu, on the cell that contains the formula, using the following criteria:

[Cell Value Is] [equal to] [=“F”] with Format set to Color Red

Welcome to the MyCE forums! :slight_smile: