What's new

Help IF FUNCTION PH-Robot

Trident_muh

Eternal Poster
Established
IF function

Column A is the score, Column B in the minimum score and Column C is the max score. and Column D is the percentage.

sample: A1 (blank cell), B1 (value 0), C1 (value 1). D1 (Percentage)

what formula should i use in Column D1, If A1 is Empty or 0 it should result in 100% but if the value in A1 has value of 1 it will return in 0%
 
Solution
To achieve the desired outcome, you can use the following formula in cell D1:

=IF(OR(A1="",A1=0),100%,IF(A1=1,0%,""))

This formula uses the IF function along with the OR function to check if cell A1 is either empty or equal to 0. If this condition is true, it will return 100%.

If the condition is false, it will move to the next IF statement, which checks if cell A1 is equal to 1. If this condition is true, it will return 0%.

If none of the conditions are met, it will return a blank cell ("").
To achieve the desired outcome, you can use the following formula in cell D1:

=IF(OR(A1="",A1=0),100%,IF(A1=1,0%,""))

This formula uses the IF function along with the OR function to check if cell A1 is either empty or equal to 0. If this condition is true, it will return 100%.

If the condition is false, it will move to the next IF statement, which checks if cell A1 is equal to 1. If this condition is true, it will return 0%.

If none of the conditions are met, it will return a blank cell ("").
 
Solution
To achieve the desired outcome, you can use the following formula in cell D1:

=IF(OR(A1="",A1=0),100%,IF(A1=1,0%,""))

This formula uses the IF function along with the OR function to check if cell A1 is either empty or equal to 0. If this condition is true, it will return 100%.

If the condition is false, it will move to the next IF statement, which checks if cell A1 is equal to 1. If this condition is true, it will return 0%.

If none of the conditions are met, it will return a blank cell ("").
Thank you my friend. mekus mekus na to hehehe
 
Is it possible for multiple rows?
Yes, it is definitely possible to apply this formula to multiple rows. You can simply copy the formula from cell D1 and paste it into the corresponding cells in column D for the other rows where you want the calculation to be applied.

For example, if you want to apply the formula to rows 2 to 10, you can copy the formula from cell D1 and paste it into cells D2 to D10. The formula will adjust automatically for each row based on the cell references used in the formula.

Note that when you copy and paste the formula, the cell references will adjust accordingly. For example, if you copy the formula from D1 to D2, the formula will automatically change to refer to cell A2, B2, and C2 instead of A1, B1, and C1.

I hope this helps! Let me know if you have any further questions.
 
Yes, it is definitely possible to apply this formula to multiple rows. You can simply copy the formula from cell D1 and paste it into the corresponding cells in column D for the other rows where you want the calculation to be applied.

For example, if you want to apply the formula to rows 2 to 10, you can copy the formula from cell D1 and paste it into cells D2 to D10. The formula will adjust automatically for each row based on the cell references used in the formula.

Note that when you copy and paste the formula, the cell references will adjust accordingly. For example, if you copy the formula from D1 to D2, the formula will automatically change to refer to cell A2, B2, and C2 instead of A1, B1, and C1.

I hope this helps! Let me know if you have any further questions.
Apologies. what i mean is multiple row but 1 result. example A1 to A6 range. once any of the rows in A1 to A6 has value it will result in 0%
 
Apologies. what i mean is multiple row but 1 result. example A1 to A6 range. once any of the rows in A1 to A6 has value it will result in 0%
Apologies for the confusion. To get a single result that shows 0% if any of the rows in A1 to A6 has a value, you can use the following formula in cell D1:

=IF(COUNTA(A1:A6)>0,0%,"")

This formula uses the COUNTA function to count the number of non-empty cells in the range A1 to A6. If the count is greater than 0, indicating that at least one cell in the range has a value, it will return 0%. Otherwise, it will return a blank cell ("").

You can then copy this formula and paste it into the corresponding cells in column D for the other rows where you want the calculation to be applied.
 
Apologies for the confusion. To get a single result that shows 0% if any of the rows in A1 to A6 has a value, you can use the following formula in cell D1:

=IF(COUNTA(A1:A6)>0,0%,"")

This formula uses the COUNTA function to count the number of non-empty cells in the range A1 to A6. If the count is greater than 0, indicating that at least one cell in the range has a value, it will return 0%. Otherwise, it will return a blank cell ("").

You can then copy this formula and paste it into the corresponding cells in column D for the other rows where you want the calculation to be applied.
The result is different. now If A1 to A6 is 0 or empty cell it should display 100% but if A1 to A6 has a value of 1 it will show 0%
 
The result is different. now If A1 to A6 is 0 or empty cell it should display 100% but if A1 to A6 has a value of 1 it will show 0%
Apologies for the confusion. To achieve the desired result where if any of the cells in the range A1 to A6 is 0 or empty, it should display 100%, but if any cell in the range has a value of 1, it will show 0%, you can use the following formula in cell D1:

=IF(COUNTIF(A1:A6,"<>1")=COUNTA(A1:A6),100%,0%)

This formula uses the COUNTIF function to count the number of cells in the range A1 to A6 that are not equal to 1. If the count of non-1 cells is equal to the count of all non-empty cells in the range (COUNTA), it means that none of the cells in the range has a value of 1, so it returns 100%. Otherwise, it returns 0%.

You can then copy this formula and paste it into the corresponding cells in column D for the other rows where you want the calculation to be applied.
 
Apologies for the confusion. To achieve the desired result where if any of the cells in the range A1 to A6 is 0 or empty, it should display 100%, but if any cell in the range has a value of 1, it will show 0%, you can use the following formula in cell D1:

=IF(COUNTIF(A1:A6,"<>1")=COUNTA(A1:A6),100%,0%)

This formula uses the COUNTIF function to count the number of cells in the range A1 to A6 that are not equal to 1. If the count of non-1 cells is equal to the count of all non-empty cells in the range (COUNTA), it means that none of the cells in the range has a value of 1, so it returns 100%. Otherwise, it returns 0%.

You can then copy this formula and paste it into the corresponding cells in column D for the other rows where you want the calculation to be applied.
It does not work, can you provide another one?

All goods now. i remove the less than sign. thank you.
 

Similar threads

Back
Top