Add Text in column U only if in column J contain specific word

vinzent

New Member
Joined
Feb 7, 2012
Messages
35
Office Version
  1. 365
Platform
  1. Windows
Hi to all, I need your help with this case:
I need to add the text "Urgent" in the end of the word in column U only if in column J contain specific text "Value" or "Error" or "Mode".
Example: In cell J2 contain the data "Value" and normally the text in cell J2 is "Type 1". Just I need to put "Type 1 Urgent"
Thank You for your help.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
It would be easier to help if you could use the XL2BB add-in (icon in the menu) to attach a screenshot (not a picture) of your sheet. Alternately, you could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary).
 
Upvote 0
How about
VBA Code:
Sub vinzent()
   With Range("U2:U" & Range("J" & Rows.Count).End(xlUp).Row)
      .Value = Evaluate(Replace(Replace("if((@=""Value"")+(@=""Error"")+(@=""Mode""),#&"" Urgent"",#)", "@", .Offset(, -11).Address), "#", .Address))
   End With
End Sub
 
Upvote 0
Solution
It would be easier to help if you could use the XL2BB add-in (icon in the menu) to attach a screenshot (not a picture) of your sheet. Alternately, you could upload a copy of your file to a free site such as www.box.com or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary).
Thank You for your feedback, I will consider this for next time. :)
 
Upvote 0
How about
VBA Code:
Sub vinzent()
   With Range("U2:U" & Range("J" & Rows.Count).End(xlUp).Row)
      .Value = Evaluate(Replace(Replace("if((@=""Value"")+(@=""Error"")+(@=""Mode""),#&"" Urgent"",#)", "@", .Offset(, -11).Address), "#", .Address))
   End With
End Sub
Thank You for your time, this is working for me :)
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,064
Messages
6,122,937
Members
449,094
Latest member
teemeren

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