ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   if statement (https://www.excelbanter.com/excel-discussion-misc-queries/178650-if-statement.html)

Kieran

if statement
 
hi i was jus wondering what the code would be if i wanted to create an if
statement where for every empty value in the cells from B2 to B29 would add
1. i had this code but it would only add 1 for when the whole field was
blank. this is the code that i was using.
=IF(B2:B29="", (1),)
hope that you can help

Mike H

if statement
 
Maybe

=COUNTBLANK(B2:B29)

Mike

"Kieran" wrote:

hi i was jus wondering what the code would be if i wanted to create an if
statement where for every empty value in the cells from B2 to B29 would add
1. i had this code but it would only add 1 for when the whole field was
blank. this is the code that i was using.
=IF(B2:B29="", (1),)
hope that you can help


Gord Dibben

if statement
 
Maybe =COUNTIF(B2:B29,"")


Gord Dibben MS Excel MVP

On Tue, 4 Mar 2008 00:37:01 -0800, Kieran
wrote:

hi i was jus wondering what the code would be if i wanted to create an if
statement where for every empty value in the cells from B2 to B29 would add
1. i had this code but it would only add 1 for when the whole field was
blank. this is the code that i was using.
=IF(B2:B29="", (1),)
hope that you can help




All times are GMT +1. The time now is 10:22 PM.

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