ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   IF Function that returns a percentage (https://www.excelbanter.com/excel-discussion-misc-queries/244398-if-function-returns-percentage.html)

zach

IF Function that returns a percentage
 
I am wanting to create a logic test formula that if the cell is equal to zero
then the output would be 100%, if the cell is not zero then I would divide
the cell by another one to get a percent. Here is my formula

IF(I395=0,"100",I396/I395)

It works but I want the number 100 to be stored as a percent so it shows up
on my chart. Any suggestions?



Mike H

IF Function that returns a percentage
 
Hi,

Try this with the cell formatted as percent

=IF(I395=0,1,I396/I395)

Mike

"Zach" wrote:

I am wanting to create a logic test formula that if the cell is equal to zero
then the output would be 100%, if the cell is not zero then I would divide
the cell by another one to get a percent. Here is my formula

IF(I395=0,"100",I396/I395)

It works but I want the number 100 to be stored as a percent so it shows up
on my chart. Any suggestions?



Sean Timmons

IF Function that returns a percentage
 
=IF(I395=0,1,I396/I395) and format the cell as %

"Zach" wrote:

I am wanting to create a logic test formula that if the cell is equal to zero
then the output would be 100%, if the cell is not zero then I would divide
the cell by another one to get a percent. Here is my formula

IF(I395=0,"100",I396/I395)

It works but I want the number 100 to be stored as a percent so it shows up
on my chart. Any suggestions?




All times are GMT +1. The time now is 05:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com