LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Broken: Set Cells in Range to 0 if blank

I can't seem to get this script working properly... Any help would be
appreciated, I am a complete beginner at VBA
Cell Rnage is N13:T27, If the cell is blank, on a save, it should be set to 0.

Sub Workbook_BeforeSave(rwNumber, clNumber)
For rwNumber = 13 To 27
For clNumber = 14 To 20
Application.ScreenUpdating = False
If IsEmpty(Worksheets("Sheet1").Cells(nRow, nCol)) Then
Cells(rwNumber, clNumber).Value = 0
Else: End If
Next clNumber
Next rwNumber
Application.ScreenUpdating = True
End Sub
 
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
Range naming cells with blank cells through coding Naveen J V Excel Discussion (Misc queries) 1 March 27th 08 01:46 PM
If certain cells not blank, and cells in range are, set values to ktoth04 Excel Discussion (Misc queries) 0 February 21st 08 09:01 PM
Maximum Number of Blank Cells between Non Blank Cells in a Range Mal Excel Worksheet Functions 5 November 3rd 07 08:21 AM
Determine if range has NO Blank Cells without looping through each cell in range Excelenator[_29_] Excel Programming 4 August 4th 06 06:30 AM
How do I skip blank cells when copying over a range of cells? tawells Excel Discussion (Misc queries) 2 June 7th 05 09:36 PM


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