Friday 22 June 2018

microsoft excel 2007 - How do I add a prefix before all the data items that are in column B?


In column B I have contact number.
I want to add a country code to all of them.


For example, if the number is 123456, I want it to become 88123456.


Each number is in 1 row, and there are about a thousand of them, so I want an automatic way to do this that allows me to add the country code to each of them without a space.



Answer



In-place modification is not a simple as it could be, the fastest solution in my mind is a quick formula in a new column, then copy that column to values (removing the formula) and replace the old column.


You can use either of the following types of formula, they're equivalent and both can be extended to link as many items as you like:


= "88" & B1
= CONCATENATE( "88" , B1 )

What To Do



  • Create a new column created next to your data

  • Insert the above formula (modified as required) at the top of the new column

  • Fill down the formula to the bottom of the column.

  • Copy the entire column.

  • Paste Special as Values over the new column.

  • Double check the new data is correct.

  • Replace old data column with new, modified, column.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...