Append text to new entries in a specific column.

gvinodnair

New Member
Joined
Jan 30, 2012
Messages
3
Hi,
I want to add the string "_manual" to any new data entries which I will be making in column number "D". Can anybody kindly advise macro for this?
Thanks in advance.
Vinod Nair.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Try this Worksheet_Change macro:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("D:D")) Is Nothing Then
    Application.EnableEvents = False
    If Right(Target, 7) <> "_manual" Then
        Target.Value = Target.Value & "_manual"
    End If
End If
Application.EnableEvents = True
End Sub
 
Upvote 0
another option

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Application.EnableEvents = False
    If Target.Column = 4 And Len(Trim(Target.Value)) > 0 Then
        Target.Value = Target.Value & "_manual"
    End If
    Application.EnableEvents = True
End Sub
 
Upvote 0
Try this Worksheet_Change macro:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("D:D")) Is Nothing Then
    Application.EnableEvents = False
    If Right(Target, 7) <> "_manual" Then
        Target.Value = Target.Value & "_manual"
    End If
End If
Application.EnableEvents = True
End Sub

Excellent!! Thanks a lot dear vaskov17
 
Upvote 0
Try this Worksheet_Change macro:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("D:D")) Is Nothing Then
    Application.EnableEvents = False
    If Right(Target, 7) <> "_manual" Then
        Target.Value = Target.Value & "_manual"
    End If
End If
Application.EnableEvents = True
End Sub

Thanks a lot dear MrKowz. Appreciate your prompt support :)
 
Upvote 0
:biggrin: Not a problem. Thank you for the feedback, and I'm glad we were able to find a solution for your needs.

Cheers!
 
Upvote 0

Forum statistics

Threads
1,214,950
Messages
6,122,428
Members
449,083
Latest member
Ava19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top