Advertisement

05.28.2008 at 01:40PM PDT, ID: 23439561
[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.0

add row in the middle with formulas, not data

Asked by VBAN in Microsoft Excel Spreadsheet Software

Tags: , ,

The following adds a row in WorksheetA before a certain rowA and in Worksheet B before a certain rowB.  The row is added to both worksheets A and B when any value is changed in the row that precedes rowA in Worksheet A.  

So as a user is entering the last line of data, another row is added with formulas and data from the previous row so that there are two identical rows, until the user revised the data in the new row.  Excel increments the formulas, which works out nicely.

This is great until the user wants to complete the list and is stuck with two identical rows.  I cannot find a way to eliminate row after RowA without the code trying to add another row when it sees a cell change.

Can I have the added new row contain only formulas, rather then formulas and data?  If yes please help!!
or
Can I clear the last duplicated row without deleting the row?  Perhaps by clearing the data in the cell?

I was trying, without luck, to use
IF LCase(Range("D" & cel + 1).Value) = ""
Then Exit Sub
End If
Else
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:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim targ As Range
Dim MatchString As String
Dim cel As Long
 
    Set targ = Intersect(Range("I20:I65536"), Target)
    If (Not targ Is Nothing) Then
        For cel = targ.Cells(1, 1).Row + targ.Rows.Count - 1 To targ.Cells(1, 1).Row Step -1
            On Error Resume Next
            If LCase(Range("D" & cel + 1).Value) = LCase("Nothing Below This Line") Then
                    
                    ActiveSheet.Select
                    Application.EnableEvents = False
                    
                    Range("D" & cel).EntireRow.Copy
                    Range("D" & cel).EntireRow.Insert Shift:=xlDown
                    Range("D" & cel).Offset(1, 0) = ""
                    
                    Quote.Range("D" & cel).EntireRow.Copy
                    Quote.Range("D" & cel).EntireRow.Insert Shift:=xlDown
                    Quote.Range("D" & cel).Offset(1, 0) = ""
                
                Application.CutCopyMode = False
                Application.EnableEvents = True
                BillOfMaterials.Select
            End If
        Next
    End If
 
End Sub
[+][-]05.31.2008 at 11:25PM PDT, ID: 21686210

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.

 
[+][-]06.05.2008 at 08:23PM PDT, ID: 21725986

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.

 
[+][-]06.05.2008 at 10:14PM PDT, ID: 21726380

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.

 
[+][-]06.05.2008 at 10:42PM PDT, ID: 21726481

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

Zone: Microsoft Excel Spreadsheet Software
Tags: Microsoft, Excel, 2003
Sign Up Now!
Solution Provided By: chris_bottomley
Participating Experts: 1
Solution Grade: A
 
 
[+][-]06.09.2008 at 12:25PM PDT, ID: 21745850

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.

 
[+][-]06.10.2008 at 04:07AM PDT, ID: 21749996

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.

 
[+][-]06.16.2008 at 01:49PM PDT, ID: 21797360

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.

 
[+][-]06.16.2008 at 07:04PM PDT, ID: 21799071

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.02.2008 at 01:50AM PDT, ID: 22143618

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

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

 
[+][-]08.06.2008 at 03:34PM PDT, ID: 22175872

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

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

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