Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / May 2008

Tip: Looking for answers? Try searching our database.

Require a macro for Excel 2007

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pcor - 13 May 2008 19:45 GMT
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
Per Jessen - 13 May 2008 19:55 GMT
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
>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
pcor - 13 May 2008 20:49 GMT
Just great. An now if I may.
How do I replace at these $0.00 with a blank
Thanks very much

> 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
Per Jessen - 13 May 2008 21:06 GMT
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

> Just great. An now if I may.
> How do I replace at these $0.00 with a blank
[quoted text clipped - 5 lines]
>> the blank cell with $0.00
>> I appreciate all the help I am getting from this site
pcor - 14 May 2008 01:34 GMT
Thanks for the quick reply...BUT that last one did not work. Any other ideas
Thanks

> Hi again,
> Thanks for your reply.
[quoted text clipped - 22 lines]
> >> the blank cell with $0.00
> >> I appreciate all the help I am getting from this site
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.