Bulk editing cells in Microsoft Excel
Solution 1
In Excel 2013 and above, you can use Flash Fill.
Manually enter the first value. Select that cell and click Flash Fill on the Data ribbon.
Before
After
Solution 2
If your id is in cell A1
, you could use this formula in cell B1
="UC_"&A1
Then drag that formula down.
The "&" symbol basically acts like a plus sign for text. You put the UC_ in double quotes to denote it's a string, then just "add" it to the id.
Solution 3
You can do this manually with a "helper" column or select the cells and run this:
Sub AddPrefix()
Dim r As Range
For Each r In Selection
r.Value = "UC_" & r.Value
Next r
End Sub
Admin
Updated on June 29, 2022Comments
-
Admin almost 2 years
I need to edit a large number of cells in Microsoft Excel and I have no idea what the best way to accomplish what I want is.
Basically, I have a list of thousands of ids like this:
503kekd23k0dLY4_ ytp-4r30=-340rR_ HdgfkER4ww=_4--3 =4tR_Ee4we403Prr
I need to be able to add a prefix of "UC_" to each of these cells so the cells look like:
UC_503kekd23k0dLY4_ UC_ytp-4r30=-340rR_ UC_HdgfkER4ww=_4--3 UC_=4tR_Ee4we403Prr
I need to run a Macro of some form in order to accomplish this most likely, but I'm not sure how to do this. If you can help, let me know.