Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default Replacing blank cells with zeros

Hello, I have a an area of a spreadsheet 15 columns wide and 256 rows deep.
Some of the cells are populated with numbers but some are blank. I would like
to replace blank cells with zeros. What is the most efficient VBA method of
achieving that.
Thank you
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default Replacing blank cells with zeros

You could use code like that below

Sub InsertZeroInBlank()
Dim myRng As Range
Set myRng = Range("A1:O256")
myRng.SpecialCells(xlCellTypeBlanks).Value = 0
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS

"Ben" wrote in message
...
Hello, I have a an area of a spreadsheet 15 columns wide and 256 rows
deep.
Some of the cells are populated with numbers but some are blank. I would
like
to replace blank cells with zeros. What is the most efficient VBA method
of
achieving that.
Thank you



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
Averaging blank or cells with Zeros in them. Glenn Excel Worksheet Functions 4 January 4th 09 10:51 PM
Replacing blank cells with zeros donpayette Excel Discussion (Misc queries) 4 September 25th 08 07:21 PM
prevent copied blank cells from replacing existing data lilleke Excel Worksheet Functions 10 August 28th 07 09:26 PM
Replacing blank cells Chris Stammers Excel Worksheet Functions 2 December 1st 05 01:41 PM
I want blank cells, but they're all zeros now that I have formatted them hays4 Excel Discussion (Misc queries) 1 October 13th 05 02:39 PM


All times are GMT +1. The time now is 03:29 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"