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

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
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,223,275
Messages
6,171,126
Members
452,381
Latest member
Nova88

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