How can I add
@gmail.com or something similar to a column of usernames without having to type this into each cell? I am using Excel 2010. I have a list of several hundred usernames that need to have
@gmail.com or something similar added to create a csv file for upload.
How can I add
If you need to change the value of the cells, I'd recommend Hand-E-Food's solution. (If you need to keep it in one column, just Copy, then Paste Special > Values back to the original column.)
However, if you want it to simply display the suffix without actually altering the cells' values, you can use a custom number format instead. In Excel 2007 or later, select Custom in Home > Number. In earlier versions, it's Format > Cells > Number. Use
@"@gmail.com" as the custom format.
In this screen shot, column A is using a custom format as I describe. Column B is using Hand's solution (you can see the formula in the center right).
If you want to add specified text in each cells of a selection directly, the following VBA macro will ease your work.
Step 1: Select the range in which you will add specified text;
Step 2: Hold down the Alt + F11 keys in Excel, and it opens the Microsoft Visual Basic for Applications window.
Step 3: Click Insert > Module, and paste the following VBA code in the Module Window.
Sub AppendToExistingOnRight() Dim c as range For each c in Selection If c.value <> "" Then c.value = c.value & "@gmail.com" Next End Sub
Step 4: Press the F5 key to run this macro.