SOLVED

Excel help - hide % formula when not needed

Copper Contributor

Hello!

 

I'm trying and currently failing to write what i thought was a simple spreadsheet for some company purchases but am struggling to reflect that some purchases are subject to VAT whilst others are not. 

 

I have added a simple formula in cell H5 to show the VAT paid as a % - in this case =G5/F5 where G is the VAT paid and F is the total amount paid.  I have formatted H5 to be a percentage, and everything works fine when the cells G5 and F5 have data in them.

 

I have copied the formula down the H column, so now all the H row entries have the following displayed in them: #DIV/0! if there is no data in the G and F cells.

 

I don't want to have to hide all the formulas and protect the sheet, so I was wondering if there is another way to make the H row column cells remain blank if there is no entry in the corresponding G column cells - i.e. if there's no VAT showing as being paid, to make the % column blank (or 0) - rather than displaying the formula text of #DIV/0!

 

Any help is appreciated.

 

A.

 

 

 

Many thanks!

 

 

3 Replies
best response confirmed by Andy Kirk (Copper Contributor)
Solution

Hi Andy,

 

You may use

=IFERROR(G5/F5,"")

Sergei,

 

Many thanks - problem solved!

 

Andy

Andy, you are welcome

1 best response

Accepted Solutions
best response confirmed by Andy Kirk (Copper Contributor)
Solution

Hi Andy,

 

You may use

=IFERROR(G5/F5,"")

View solution in original post