Advertisement

08.18.2008 at 12:27PM PDT, ID: 23657460
[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!

8.6

Need to create new workbook with items formatted through conditional formatting

Asked by ilrosebud26 in Microsoft Excel Spreadsheet Software, Visual Basic Programming

I have a spreadsheet with a column (column D or 4) that has conditional formatting.  I need to create a new workbook with the items that are formatted as bold red.  I have written the below but it returns no results.....I just found out that this is not as easy as it seems.  Any help would be appreciated.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:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
Public Sub CreateWBDupItems()
    Dim dupitemwb As Workbook
    Dim createFileDevwb As Workbook
    Dim createFileDevWS As Worksheet
    Dim dupitemWS As Worksheet
    Dim strFile As String
    Dim w As Workbook
            
    Dim i As Integer
    Dim NS As Integer
    Dim lastrow As Integer
        
    i = 1 'Beginning point of the loop
    NS = 2 'Beginning point of load file for unloaded costs
    lastrow = Cells(Application.Rows.Count, 1).End(xlUp).Row
    
    Set createFileDevwb = ActiveWorkbook ' Obtain a reference to this workbook (assumed active at macro start)
    Set createFileDevWS = ActiveSheet
    Set dupitemwb = Workbooks.Add
    strFile = "C:\My Documents\UnloadedCosts" & CStr(Format(Now, "MMDDYYHHm")) & ".xls"
    ActiveWorkbook.SaveAs Filename:=strFile
    Set dupitemWS = ActiveSheet
    
   'Add Headers, change font to bold
    Range("A1").Select
    ActiveCell.FormulaR1C1 = "Date Entered"
    With Selection.Font
        .Name = "Arial"
        .FontStyle = "Bold"
        .Size = 10
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .ColorIndex = xlAutomatic
    End With
    Range("B1").Select
    ActiveCell.FormulaR1C1 = "By Initials"
    With Selection.Font
        .Name = "Arial"
        .FontStyle = "Bold"
        .Size = 10
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .ColorIndex = xlAutomatic
    End With
    Range("C1").Select
    ActiveCell.FormulaR1C1 = "Item Number"
    With Selection.Font
        .Name = "Arial"
        .FontStyle = "Bold"
        .Size = 10
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .ColorIndex = xlAutomatic
    End With
    Range("A1").Select
    
    'Create status worksheet
    Do While i <= lastrow
        If createFileDevWS.Cells(i, 4).Font.Color = vbRed And createFileDevWS.Cells(i, 4).Font.Bold = True Then
        dupitemWS.Cells(NS, 1).Value = createFileDevWS.Cells(i, 1).Value
        dupitemWS.Cells(NS, 2).Value = createFileDevWS.Cells(i, 2).Value
        dupitemWS.Cells(NS, 3).Value = createFileDevWS.Cells(i, 3).Value
        NS = NS + 1
        End If
        
        i = i + 1
    Loop
    
    'Autofit columns and right justify item number
    Cells.Select
    Selection.Columns.AutoFit
    Columns("C:C").Select
    With Selection
        .HorizontalAlignment = xlLeft
        .VerticalAlignment = xlBottom
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
    End With
    
    'Sort by Date Entered,By Initals and then item number
    Range("A1:C" & lastrow).Select
    Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Key2:=Range( _
    "B2"), Order2:=xlAscending, Key3:=Range("C2"), Order3:=xlAscending, _
    Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:= _
    xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, _
    DataOption3:=xlSortNormal
        
    'Go to first cell on worksheet
    Range("A1").Select
  
    'Save all open worksheets
    For Each w In Application.Workbooks
        w.Save
    Next w
    
    Exit Sub
    
End Sub
Attachments:
 
Example file
 
[+][-]08.18.2008 at 12:28PM PDT, ID: 22254829

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.

 
[+][-]08.18.2008 at 12:30PM PDT, ID: 22254844

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.

 
[+][-]08.18.2008 at 04:48PM PDT, ID: 22256314

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.

 
[+][-]08.20.2008 at 11:49AM PDT, ID: 22272693

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.

 
[+][-]08.21.2008 at 12:08PM PDT, ID: 22283225

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.

 
[+][-]08.25.2008 at 09:34PM PDT, ID: 22311613

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.

 
[+][-]08.28.2008 at 02:30PM PDT, ID: 22340109

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.08.2008 at 01:16PM PDT, ID: 22421093

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.09.2008 at 06:46AM PDT, ID: 22427256

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.09.2008 at 07:16AM PDT, ID: 22427578

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.09.2008 at 07:25AM PDT, ID: 22427684

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.09.2008 at 08:06AM PDT, ID: 22428163

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.09.2008 at 08:29AM PDT, ID: 22428476

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.09.2008 at 09:13AM PDT, ID: 22429037

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, Visual Basic Programming
Sign Up Now!
Solution Provided By: byundt
Participating Experts: 1
Solution Grade: A
 
 
[+][-]09.11.2008 at 10:26AM PDT, ID: 22452298

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