Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add blanks to cells

Status
Not open for further replies.

bernie10

Technical User
Sep 13, 2004
219
US
Hello all,
This code takes a long time to run... is there a better way? Objective is to add a blank to every empty excel cell in the range.

Code:
Sub AddBlanks()
    For I = 1 To 2000
        For J = 1 To 50
            If Trim(ActiveSheet.Cells(I, J).Value & "") = "" Then
                ActiveSheet.Cells(I, J).Value = "'"
            End If
        Next J
    Next I
End Sub

Is there a more effecient way to achieve this objective?

Thanks,

Collen
 
Please disregard... found a non-programmatic solution to the problem.

Using Edit-> GoTo-> Blanks
Then I enter the blank and hit control + enter.

Thanks,
Collen
 


collen,

So this is where you insert the TICs!

Why?

Skip,
[sub]
[glasses] [red]Be advised:[/red]To be safe on the FOURTH, don't take a FIFTH on the THIRD, or...
You might not come FORTH on the FIFTH! [bomb][tongue][/sub]
 
Hi Skip,
The tick marks are there because they the pivot filter values appear as " " instead of (blank). It makes it easier to filter- the other people using the sheet have requested that they be left. Perhaps they didn't have performance in mind when they initially created the sheet with all the ticks.


Collen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top