I need a progress counter for existing modues

dalebennett12349

New Member
Joined
Jul 21, 2010
Messages
9
Hey All,

I have 4 modues that delete unwanted email addressses from column A based on 4 different criteria. I need a numeric counter to show the progress of the deleting process.

I will share the VBA code for each module if you are willing tackle the project.

Also, how do I share the code in this forum?

THX

Dale
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

dalebennett12349

New Member
Joined
Jul 21, 2010
Messages
9
The following is the code for the counter I need the most.

Sub Main()
Dim u1 As Long
Dim u2 As Long
Dim j1 As Long
Dim j2 As Long
Dim zN As Integer
Dim sht1 As String
Dim sht2 As String
Dim zS1 As String
Dim zS2 As String
Application.ScreenUpdating = False
sht1 = "Email addresses"
sht2 = "Names"
u1 = Sheets(sht1).Range("A1048576").End(xlUp).Row
u2 = Sheets(sht2).Range("A1048576").End(xlUp).Row
For j1 = 1 To u1
'If Sheets(sht1).Cells(j1, 1) = "" Then GoTo 111
zN = 0
For j2 = 1 To u2
zS1 = UCase(Sheets(sht1).Cells(j1, 1))
zS2 = UCase(Sheets(sht2).Cells(j2, 1))
If InStr(zS1, zS2) > 0 Then
zN = 1
Exit For
End If
Next j2
If zN = 0 Then
Sheets(sht1).Cells(j1, 1) = ""
zN = 0
End If
111
Next j1
Sheets(sht1).Range("A1:A" & u1).Sort Key1:=Sheets(sht1).Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Application.ScreenUpdating = True
End Sub
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,732
Messages
5,833,369
Members
430,206
Latest member
Sami Gaid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top