Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Fill empty cells

I am new to VBA code for excel, and here is my situation. I have
written a macro and the last part of my macro is to check for the
following:

I have a range of cells I have selected, and I need to look throughout
this range and see if there is any empty cells, if there is...I have
to fill it with a zero (0) . Does anyone have any code that would
help me here? Thanks

M.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Fill empty cells


Put this in your macro:

For Each c in Selection.Cells
If c.Value = Empty then c.Value = 0
Next


Col


--
colofnature
------------------------------------------------------------------------
colofnature's Profile: http://www.excelforum.com/member.php...o&userid=34356
View this thread: http://www.excelforum.com/showthread...hreadid=544739

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Fill empty cells

Thanks soooo much...

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
fill down empty cells at every change in value Rose Excel Worksheet Functions 4 March 24th 09 03:03 PM
Excel - Fill empty cells Yendorian Excel Worksheet Functions 3 July 23rd 07 09:34 AM
I need to fill only empty cells in a database with a symbol. SMC Excel Discussion (Misc queries) 2 April 24th 07 04:28 PM
Fill empty cells Thiem[_2_] Excel Programming 1 January 9th 06 11:03 AM
Fill-in empty cells from SAP report Ilieski Excel Worksheet Functions 3 September 14th 05 12:55 PM


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

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

About Us

"It's about Microsoft Excel"