Advertisement

09.22.2008 at 06:28AM PDT, ID: 23751305
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.1

VBA - Efficient Loop to delete 8000 rows by 4 criterias. (It takes me two mins).

Asked by Shino_skay in Microsoft Excel Spreadsheet Software, Programming Languages, Visual Basic Programming

Hi everyone. I wrote a code that loops through 8500 rows step-1 and deletes the entirerow based on 4 criterias. The problem I'm haivng is, it freezes excel for about 2 mins with screen updating = false.  I was wondering if anyone on this forum knows a better way to do this multi-criteria row delete.

The columns of interest are
Trade ID
Books
Counterparty.

Trade ID cannot be equal to "TOTAL" or <> UCase("bloomberg")
The trader's "BOOKS" are loaded onto a dictionary object and if it does NOT exist, delete entire row
The excluded counterparties are loaded onto another dictionary object and if it DOES exist, delete entire row.

Thanks everyone.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
Sub DeleteNonPierceBooksAndCpty()
 
Application.ScreenUpdating = False
 
'Deleting Rows where Non-Pierce Books exist:
Dim strBondCalBookLookup As String, strBondCalCptyLookup As String
Dim strBondCalTradeIdConfirm As String
Dim i As Integer
 
For i = lngTotalBondsBeforeFilter To 2 Step -1
strBondCalBookLookup = shtBondCal.Cells(i, lngBondDataBookColumn).Value
strBondCalCptyLookup = shtBondCal.Cells(i, lngBondDataCptyColumn).Value
strBondCalTradeIdConfirm = shtBondCal.Cells(i, lngBondDataTradeIdColumn).Value
    If Not dicPierceBooks.exists(strBondCalBookLookup) And strBondCalBookLookup <> "" Then
        shtBondCal.Rows(i).EntireRow.Delete
    End If
    If dicExcludedCpty.exists(strBondCalCptyLookup) Then
        shtBondCal.Rows(i).EntireRow.Delete
    End If
    If strBondCalTradeIdConfirm = "Total" Or Left(UCase(strBondCalTradeIdConfirm), 9) <> UCase("bloomberg") Then
        shtBondCal.Rows(i).EntireRow.Delete
    End If
'    If Left(UCase(strBondCalTradeIdConfirm), 9) <> UCase("bloomberg") Then
 '       shtBondCal.Rows(i).EntireRow.Delete
  '  End If
Next i
 
'Find out how many rows are left now after we deleted the Non-Pierce books
lngRowsAfterFilter = shtBondCal.Columns _
    (lngBondDataTradeIdColumn).SpecialCells(xlCellTypeConstants, xlTextValues).Rows.Count
 
Application.ScreenUpdating = True
End Sub
[+][-]09.22.2008 at 06:39AM PDT, ID: 22539830

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.22.2008 at 06:45AM PDT, ID: 22539885

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09.22.2008 at 06:49AM PDT, ID: 22539917

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.22.2008 at 07:00AM PDT, ID: 22540029

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.22.2008 at 07:06AM PDT, ID: 22540091

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.22.2008 at 07:21AM PDT, ID: 22540233

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09.22.2008 at 07:30AM PDT, ID: 22540314

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.22.2008 at 07:32AM PDT, ID: 22540333

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.22.2008 at 07:47AM PDT, ID: 22540489

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Excel Spreadsheet Software, Programming Languages, Visual Basic Programming
Sign Up Now!
Solution Provided By: brettdj
Participating Experts: 2
Solution Grade: A
 
 
[+][-]09.22.2008 at 07:49AM PDT, ID: 22540513

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09.22.2008 at 07:53AM PDT, ID: 22540550

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.22.2008 at 08:16AM PDT, ID: 22540805

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09.22.2008 at 08:50AM PDT, ID: 22541106

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.22.2008 at 08:51AM PDT, ID: 22541126

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.22.2008 at 11:14AM PDT, ID: 22542444

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.22.2008 at 11:29AM PDT, ID: 22542569

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]09.22.2008 at 01:28PM PDT, ID: 22543771

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.22.2008 at 01:35PM PDT, ID: 22543842

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.22.2008 at 02:03PM PDT, ID: 22544122

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628