How do I add custom prefix text to all cells within a column?

Fucius

Board Regular
Joined
Jul 8, 2008
Messages
115
Hi Guys,

How do I add custom prefix text to all cells within a column?

example:

Before:

one
two
three

After:

misc.one
misc.two
misc.three

Any help would be greatly appreciated!

Thanks
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
if your data is in cells B1, B2 & B2 then use the formula in cell A1

="misc."&B1

and copy down

HTH, Mr R.
 
Upvote 0
Try using vba code below

Code:
Sub Macro1()
Dim LastRow As Long
LastRow = Range("A" & Rows.Count).End(xlUp).Row
With Range("B2:B" & LastRow)
    .Formula = "=""misc.""&A2"
    .Value = .Value
End With
    
End Sub
 
Upvote 0
**** you guys are quick! I figured it out and was about to delete this post but ya'll beat me to it. Thanks so much for the help! ;)
 
Upvote 0
**** you guys are quick! I figured it out and was about to delete this post but ya'll beat me to it. Thanks so much for the help! ;)

Thanks for feedback.

Biz :beerchug:
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,328
Members
452,907
Latest member
Roland Deschain

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