Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.links
Sunny
 
Posts: n/a
Default macro to fill blank cells

Hello,

i have to update all cells with zero if it is blank according to a
particlular date.
In other words,

if the date is todays date and the cells are blank, then i need to put zero
in each of those cells.

i was thinking wheter i can write a macro on it so that i need no do it
manually for each and every sheet.

can anyone help me out on this.

thanks & Regards,
sunny.
:)
  #2   Report Post  
Posted to microsoft.public.excel.links
Ken Wright
 
Posts: n/a
Default macro to fill blank cells

Try selecting your range, doing Edit / Go To / Special / Blanks, then type 0
and hit CTRL+ENTER to enter it in all blank cells. If you record a macro
doing that you can then have it run for every sheet by wrapping it in
something like:-

Sub abc()
For Each sht In ActiveWorkbook.Worksheets
sht.Activate
Range("A1:F100").SpecialCells(xlCellTypeBlanks).Va lue = 0
Next sht
End Sub

or

Sub abc()
For Each sht In ActiveWorkbook.Worksheets
Range("A1:F100").SpecialCells(xlCellTypeBlanks).Va lue = 0
Next sht
End Sub

First way activates each sheet and second doesn't.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------*------------------------------*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------*------------------------------*----------------



"Sunny" <u19980@uwe wrote in message news:5da44791832c9@uwe...
Hello,

i have to update all cells with zero if it is blank according to a
particlular date.
In other words,

if the date is todays date and the cells are blank, then i need to put
zero
in each of those cells.

i was thinking wheter i can write a macro on it so that i need no do it
manually for each and every sheet.

can anyone help me out on this.

thanks & Regards,
sunny.
:)



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
Counting blank cells until value is reached Dan Excel Worksheet Functions 9 March 1st 06 01:56 PM
Using a Macro to paste into Blank Cells phillipsb Excel Worksheet Functions 0 October 5th 05 05:58 PM
Generating truly blank cells Nat Excel Worksheet Functions 4 September 30th 05 11:39 PM
enter numbers in blank cells bill gras Excel Worksheet Functions 2 September 21st 05 01:17 PM
Blank Cells in Pivot Tables Greg Excel Discussion (Misc queries) 1 March 16th 05 10:23 PM


All times are GMT +1. The time now is 10:46 AM.

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"