Merging cells or adding to a cell

vampcatt

New Member
Joined
Feb 22, 2002
Messages
26
OK.. If I have product numbers in column A of a file, and I want to add a couple characters to the beginning of each number.

example.. code is "123".. I want the code to be "FF123" is there a simple way to do this?
Either an add command, or even creating a whole column of "FF" and them merging them?

I do not wish to do this manually by editing as there are THOUSANDS of rows to edit.

thanks!
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
On 2002-04-10 22:46, vampcatt wrote:


OK.. If I have product numbers in column A of a file, and I want to add a couple characters to the beginning of each number.

example.. code is "123".. I want the code to be "FF123" is there a simple way to do this?
Either an add command, or even creating a whole column of "FF" and them merging them?

I do not wish to do this manually by editing as there are THOUSANDS of rows to edit.

thanks!

I'm sure someone will provide you a macro.

The formula-way is just:

="FF"&A1

where A1 houses the first entry that you want to modify.

Enter this in B1 and give a double click on its fill handle in order to copy the formula down. Then copy all of the cells in B and execute Edit|Paste Special >Values in place. Delete column A.

Aladin
 
Upvote 0
assuming your numbers are in column A, select column B and type in FF or whatever in the formula bar. press ctrl+shift+enter simultaneously, which will put 'FF' in the entire column. in the first row of column C, put =A1&B1 and copy this down as far as needed using the fill handle (bottom right of cell). then select column C again, do copy> paste special>values and delete column B
 
Upvote 0
Here is a macro, need some polish but works,

Sub AddFF()

Dim myRange As Range
Set myRange = Range("A1:A5000")
For i = 1 To myRange.Cells.Count
myRange.Cells(i).Value = "FF" & myRange.Cells(i).Value
Next i
End Sub

Just adjust the number of rows (set to 5000)
Eli
 
Upvote 0

Forum statistics

Threads
1,214,385
Messages
6,119,210
Members
448,874
Latest member
b1step2far

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