#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can an If statement answer an If statement? M.A.Tyler Excel Discussion (Misc queries) 2 June 24th 07 04:14 AM
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM
IF statement? metalsped Excel Discussion (Misc queries) 2 June 8th 05 08:32 PM
If statement and Isblank statement Rodney C. Excel Worksheet Functions 0 January 18th 05 08:39 PM
Help please, IF statement/SUMIF statement Brad_A Excel Worksheet Functions 23 January 11th 05 02:24 PM


All times are GMT +1. The time now is 09:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"