Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




2484 posts

Uber Geek
+1 received by user: 535
Inactive user


Topic # 151455 26-Aug-2014 08:35
Send private message

Hi All,

Not sure if this is the right place to post this, and appologies if I am incorerect.

I have some data I need to format from an excel sheet to upload.

The data is pulled from another system and can have some very basic manipulation before being uploaded.

What I need to do is format phone numbers, they come out of one system as 2 cells, first is area code, the second the number.

i.e. First field 04 second field 1234567 I have used the & function to add them together in another field but it removes the leading zero everytime, I have tried different formats for the destination cell but nothing is working! If I change to text then it returns the text "=F2&F3"

Create new topic
2284 posts

Uber Geek
+1 received by user: 224


  Reply # 1115649 26-Aug-2014 08:51
Send private message

The source columns need to be the same type as the destination. IE all need to be 'text'

I just did it and it works fine, the only reason I can see that you would get the equation as text is inputting that incorrectly, or not utilising the insert function builder window

The alternate is use concantinate function

109 posts

Master Geek
+1 received by user: 27


  Reply # 1116068 26-Aug-2014 19:05
2 people support this post
Send private message

It sounds like the numbers are stored as text given that the leading zero is displayed in the first column, but maybe not, this formula should work regardless of whether column A is stored as text or number.

Assuming you are using columns A and B for the two numbers, try:

=CONCATENATE(TEXT(VALUE(A1),00)," ",TEXT(VALUE(B1),0000000))

This should yield a text formatted cell, with phone numbers in the style 0X YYYYYYY


 
 
 
 




2484 posts

Uber Geek
+1 received by user: 535
Inactive user


  Reply # 1116208 27-Aug-2014 08:02
Send private message

Thanks for that formula, excuse my ignorance but when I use the formula it removes the extra zeros in the formula.

How do I get Excel to stop doing this!

It returns a #value! error.

YJ

100 posts

Master Geek
+1 received by user: 4


  Reply # 1116211 27-Aug-2014 08:09
Send private message

dickytim: Thanks for that formula, excuse my ignorance but when I use the formula it removes the extra zeros in the formula.

How do I get Excel to stop doing this!

It returns a #value! error.


=CONCATENATE(TEXT(A1,00)," ",TEXT(B1,0000000))

this should do the job

31 posts

Geek


  Reply # 1116215 27-Aug-2014 08:23
Send private message

I used to have this issue with part numbers with leading zeroes.  Only reliable method I founds was to ensure that the source file was .txt, not .csv.  Excel would automatically open CSVs and convert strings containing only digits to their numeric value therefore stripping the leading zeroes from the text.  TXTs would use the text import wizard.  As others have noted, one of the steps in the wizard allows you to set the data type for each column.  The column with leading zeroes needs to be set to text, not general.

Create new topic



Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

Intel reimagines data centre storage with new 3D NAND SSDs
Posted 16-Feb-2018 15:21


Ground-breaking business programme begins in Hamilton
Posted 16-Feb-2018 10:18


Government to continue search for first Chief Technology Officer
Posted 12-Feb-2018 20:30


Time to take Appleā€™s iPad Pro seriously
Posted 12-Feb-2018 16:54


New Fujifilm X-A5 brings selfie features to mirrorless camera
Posted 9-Feb-2018 09:12


D-Link ANZ expands connected smart home with new HD Wi-Fi cameras
Posted 9-Feb-2018 09:01


Dragon Professional for Mac V6: Near perfect dictation
Posted 9-Feb-2018 08:26


OPPO announces R11s with claims to be the picture perfect smartphone
Posted 2-Feb-2018 13:28


Vocus Communications wins a place on the TaaS panel
Posted 26-Jan-2018 15:16


SwipedOn raises $1 million capital
Posted 26-Jan-2018 15:15


Slingshot offers unlimited gigabit fibre for under a ton
Posted 25-Jan-2018 13:51


Spark doubles down on wireless broadband
Posted 24-Jan-2018 15:44


New Zealand's IT industry in 2018 and beyond
Posted 22-Jan-2018 12:50


Introducing your new workplace headache: Gen Z
Posted 22-Jan-2018 12:45


Jucy set to introduce electric campervan fleet
Posted 22-Jan-2018 12:41



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.