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
 

Some videos you may like

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

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
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,534
Messages
5,511,881
Members
408,867
Latest member
Ranjeet yamgekar

This Week's Hot Topics

  • Turn fraction around
    Hello I need to turn a fraction around, for example I have 1/3 but I need to present as 3/1
  • TIme Clock record reformatting to ???
    Hello All, I'd like some help formatting this (Tbl-A)(Loaded via Power Query) [ATTACH type="full" width="511px" alt="PQdata.png"]22252[/ATTACH]...
  • TextBox Match
    hi, I am having a few issues with my code below, what I need it to do is when they enter a value in textbox8 (QTY) either 1,2 or 3 the 3 textboxes...
  • Using Large function based on Multiple Criteria
    Hello, I can't seem to get a Large formula to work based on two criteria's. I can easily get a oldest value based one value, but I'm struggling...
  • Can you check my code please
    Hi, Im going round in circles with a Compil Error End With Without With Here is the code [CODE=rich] Private Sub...
  • Combining 2 pivot tables into 1 chart
    Hello everyone, My question sounds simple but I do not know the answer. I have 2 pivot tables and 2 charts that go with this. However I want to...
Top