ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how to add a "+" to a number in a cell (https://www.excelbanter.com/excel-worksheet-functions/175939-how-add-number-cell.html)

Martin

how to add a "+" to a number in a cell
 
I need to change a lot of phone-numbers in my Excel-sheet, by adding a " + "
to the country prefix.
How do I do that?
When I use "Search" / "Find", and write the paragraphs " + * " in the
replace box, it erase the whole number instead of adding the "+".. Which
wasnt what I was looking for €¦

Gary''s Student

how to add a "+" to a number in a cell
 
select the cells and run this macro:

Sub plus_it()
For Each r In Selection
r.NumberFormat = "@"
r.Value = "+" & r.Value
Next
End Sub

--
Gary''s Student - gsnu200767


"Martin" wrote:

I need to change a lot of phone-numbers in my Excel-sheet, by adding a " + "
to the country prefix.
How do I do that?
When I use "Search" / "Find", and write the paragraphs " + * " in the
replace box, it erase the whole number instead of adding the "+".. Which
wasnt what I was looking for €¦



All times are GMT +1. The time now is 09:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com