+ Reply to Thread
Results 1 to 17 of 17

Workshhet Formula

  1. #1
    Registered User
    Join Date
    04-30-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    72

    Question Workshhet Formula

    Hey below is a code I received before and I tweek it a bit but it slows my computer down when I run it and sometimes freeze the whole PC any advise on how I can Prevent this




    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column = 6 Then
    If UCase(Target.Value) = "CLOSED" Or _
    UCase(Target.Value) = "RESOLVED" Then
    Target.EntireRow.Copy Destination:=Sheets("CLOSED"). _
    Range("A" & Rows.Count).End(xlUp).Offset(1)
    Target.EntireRow.Delete
    End If
    End If
    End Sub

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Workshhet Formula

    You work with

    Private Sub Worksheet_Change(ByVal Target As Range)

    It runs the macro every time you change a value.

    Maybe it's better to manualy active the macro.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    04-30-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    72

    Re: Workshhet Formula

    What do you mean Manually activate the Macro

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Workshhet Formula

    By a button.

    or by devellopers => macro (then select your macro).

  5. #5
    Registered User
    Join Date
    04-30-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    72

    Re: Workshhet Formula

    Sorry Cant seem To find the Macro when I go into Macros it does not show my Macro

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Workshhet Formula

    Change youre code in this one, and try again.

    You will see a macro called gmcgrane

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    04-30-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    72

    Re: Workshhet Formula

    Had An Error it says Object Required ??

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Workshhet Formula

    Maybe you an example of your workbook without confidential information.

  9. #9
    Registered User
    Join Date
    04-30-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    72

    Re: Workshhet Formula

    I tried to upload the Basic Format but the Size is to Large thats without any Macro enabled
    Capture.jpg
    So Best I can Do is add a screen shot Sorry

  10. #10
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Workshhet Formula

    You can upload your example with this (free) site.

  11. #11
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Workshhet Formula

    You can upload your example with this (free) (dutch) site.

    http://www.mijnbestand.nl/

  12. #12
    Registered User
    Join Date
    04-30-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    72

  13. #13
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Workshhet Formula

    The problem you have with your own macro is, that it copies the value on sheet "closed" from row 1 till row 1,048,576.

    You also get the whole row in all these cells.

    I don't think you want that either.

    I could not get my macro work (in your workbook).

    I can't help you enough with VBA.

    You need to rely on someone else.

    Sorry for that (unconvience).

    I know this => you should rephrase the macro so it does not copy it to all cells of the "closed"sheets.
    There should be the solution.

    I will follow the answers to this thread, so I will, also, learn from this question.

  14. #14
    Registered User
    Join Date
    04-30-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    72

    Re: Workshhet Formula

    I don't need to Copy All Rows just A-G to copy to Closed Thanks For your assistance

  15. #15
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Workshhet Formula

    I understand you post in #14.

    It copies the rows with in column 6 the words closed or resolved.

    If these words are in column 6, it should be copied.

    But it copies the whole row (whitch you intend to do), to all rows on the destiny sheet.
    And i suppose you don't want that.

  16. #16
    Registered User
    Join Date
    04-30-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    72

    Re: Workshhet Formula

    Yes I need to but would it make it any faster If I reduce the amount I need to Copy For Example If I only need to copy certain Cells
    Columns range "A" "C" "E"

  17. #17
    Registered User
    Join Date
    04-30-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    72

    Re: Workshhet Formula

    Yes I would like to copy all to closed--
    But would it make it faster if I copy just Colums "A" "B""E"

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1