ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF function (https://www.excelbanter.com/excel-worksheet-functions/208925-if-function.html)

waleed

IF function
 
Hi,
if I have numbers in cells as
B1 4
B2 5
B3 6
B5
B6
B5 and B6 empty (no numbers inside these cells, but in future I will add
numbers to these cells), and I want to format C5 and set a formula in as
IF(B6(has any number inside);(B6-B1)) and C5 return the difference between
B6-B1 only if there is number in B6, otherwise leave C5 empty
Thanks

Pete_UK

IF function
 
Put this in C5:

=IF(B6="","",B6-B1)

Hope this helps.

Pete

"Waleed" wrote in message
...
Hi,
if I have numbers in cells as
B1 4
B2 5
B3 6
B5
B6
B5 and B6 empty (no numbers inside these cells, but in future I will add
numbers to these cells), and I want to format C5 and set a formula in as
IF(B6(has any number inside);(B6-B1)) and C5 return the difference between
B6-B1 only if there is number in B6, otherwise leave C5 empty
Thanks





All times are GMT +1. The time now is 04:13 AM.

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