Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 148
Default Require a macro for Excel 2007

I need a macro that will check out a given range( say a1 to z100)
As it checkd ther range(a1..z100) if there is NOT data in the cell, replace
the blank cell with $0.00
I appreciate all the help I am getting from this site

  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1,533
Default Require a macro for Excel 2007

Hi

Try this:

Sub FillRange()
Dim TargetRange As Range
Set TargetRange = Range("A1:Z100")

For Each c In TargetRange
If c.Value = "" Then c.Value = Format("0", "$0.00")
Next
End Sub

Regards,
Per
"pcor" skrev i meddelelsen
...
I need a macro that will check out a given range( say a1 to z100)
As it checkd ther range(a1..z100) if there is NOT data in the cell,
replace
the blank cell with $0.00
I appreciate all the help I am getting from this site


  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 148
Default Require a macro for Excel 2007

Just great. An now if I may.
How do I replace at these $0.00 with a blank
Thanks very much

"pcor" wrote:

I need a macro that will check out a given range( say a1 to z100)
As it checkd ther range(a1..z100) if there is NOT data in the cell, replace
the blank cell with $0.00
I appreciate all the help I am getting from this site

  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1,533
Default Require a macro for Excel 2007

Hi again,
Thanks for your reply.

Try this

Sub EmptyRange()
Dim TargetRange As Range
Set TargetRange = Range("A1:Z100")

For Each c In TargetRange
If c.Value = Format("0", "$0.00") Then c.Value = ""
Next
End Sub

Best regards,
Per

"pcor" skrev i meddelelsen
...
Just great. An now if I may.
How do I replace at these $0.00 with a blank
Thanks very much

"pcor" wrote:

I need a macro that will check out a given range( say a1 to z100)
As it checkd ther range(a1..z100) if there is NOT data in the cell,
replace
the blank cell with $0.00
I appreciate all the help I am getting from this site


  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 148
Default Require a macro for Excel 2007

Thanks for the quick reply...BUT that last one did not work. Any other ideas
Thanks

"Per Jessen" wrote:

Hi again,
Thanks for your reply.

Try this

Sub EmptyRange()
Dim TargetRange As Range
Set TargetRange = Range("A1:Z100")

For Each c In TargetRange
If c.Value = Format("0", "$0.00") Then c.Value = ""
Next
End Sub

Best regards,
Per

"pcor" skrev i meddelelsen
...
Just great. An now if I may.
How do I replace at these $0.00 with a blank
Thanks very much

"pcor" wrote:

I need a macro that will check out a given range( say a1 to z100)
As it checkd ther range(a1..z100) if there is NOT data in the cell,
replace
the blank cell with $0.00
I appreciate all the help I am getting from this site





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
I require a macro to complete ignoring the following error phil Excel Discussion (Misc queries) 0 March 27th 08 09:40 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
I require code to run a macro dependant on the date Marie Bayes Excel Discussion (Misc queries) 7 January 15th 07 03:48 PM
require macro or code for purchase order to do the following: jatman Excel Worksheet Functions 0 August 11th 06 06:02 AM
Require Tmplwiz.exe for Excel 2003 Gdoc Excel Discussion (Misc queries) 0 January 18th 06 10:59 PM


All times are GMT +1. The time now is 07:24 PM.

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"