0

I want to write a formula that returns a percentage. Let's say I have columns A, B, C. If A = 4 and B = 5, it should give 80% in the same row in column C (which is the result column).

Some more examples of how it should be: if A = 9, B = 10, it will automatically fill C with 90% in the same row.

A and B are already filled out with values, so all that is left is to fill column C with percentage as described above for each row automatically.

1 Answer 1

2

Percentage is just a way of formatting the result of dividing two numbers. So, what you should do is (a) divide the values in A by the values in B; (b) format the result is a percentage.

Division can be done with the formula (for cell C2):

=arrayformula(iferror(A2:A/B2:B)) 

which works for all rows starting from the 2nd (assuming 1st row is headers). The iferror wrapper leaves the result empty if the division could not be done (e.g., for the empty rows in the sheet).

To format a column as a percentage, select it and click the button with % symbol.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.