• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Need help please see excel file

Hi rajesh,

Not sure with your example file what you need to do, can you please explain with result you want on sheet 2..
 
Need help. Trying to enter a particular value in a cell and vba macro should trigger immediate..Didn;t work. please check the xls file. thanks
 

Attachments

Hi again @Rajesh_123

This post is a different thing about your original question. Next time you must open a new thread - question.

This macro must help (in Sheet1, paste this code):
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Application.EnableEvents = False
    If Target.Column = 3 And LCase(Target.Value) = "ok" Then
        uf = Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Row + 1
        With Target.EntireRow
            .Copy: Sheets("Sheet2").Range("A" & uf).PasteSpecial xlValues: .Delete
        End With
    End If
    Application.EnableEvents = True
End Sub

Next here the file working!
I hope it helps. Blessings!
 

Attachments

Thanks, but the only problem is instead of ok, if i enter someother text, and then continue to type ok on next row, the code didn't work. If i add new columns to the right, the code shows debug and didn't work

Any help will be highly appreciated
 

Attachments

Hi again Rajesh_123.

Try the file again... I made a little correction. Remember that the code works with "OK" or "ok" (without quotes) always on column 3 of the sheet.

Please Comment! Blessings!

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Application.EnableEvents = False
    On Error GoTo Ends
    If Target.Column = 3 And LCase(Target.Value) = "ok" Then
        uf = Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Row + 1
        With Target.EntireRow
            .Copy: Sheets("Sheet2").Range("A" & uf).PasteSpecial xlValues: .Delete
        End With
    End If
Ends:
    Application.EnableEvents = True
End Sub
 

Attachments

Back
Top