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
2630 posts

Uber Geek
+1 received by user: 271


  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

112 posts

Master Geek
+1 received by user: 28


  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 »

N4L helping TAKA Trust bridge the digital divide for Lower Hutt students
Posted 18-Jun-2018 13:08


Winners Announced for 2018 CIO Awards
Posted 18-Jun-2018 13:03


Logitech Rally sets new standard for USB-connected video conference cameras
Posted 18-Jun-2018 09:27


Russell Stanners steps down as Vodafone NZ CEO
Posted 12-Jun-2018 09:13


Intergen recognised as 2018 Microsoft Country Partner of the Year for New Zealand
Posted 12-Jun-2018 08:00


Finalists Announced For Microsoft NZ Partner Awards
Posted 6-Jun-2018 15:12


Vocus Group and Vodafone announce joint venture to accelerate fibre innovation
Posted 5-Jun-2018 10:52


Kogan.com to launch Kogan Mobile in New Zealand
Posted 4-Jun-2018 14:34


Enable doubles fibre broadband speeds for its most popular wholesale service in Christchurch
Posted 2-Jun-2018 20:07


All or Nothing: New Zealand All Blacks arrives on Amazon Prime Video
Posted 2-Jun-2018 16:21


Innovation Grant, High Tech Awards and new USA office for Kiwi tech company SwipedOn
Posted 1-Jun-2018 20:54


Commerce Commission warns Apple for misleading consumers about their rights
Posted 30-May-2018 13:15


IBM leads Call for Code to use cloud, data, AI, blockchain for natural disaster relief
Posted 25-May-2018 14:12


New FUJIFILM X-T100 aims to do better job than smartphones
Posted 24-May-2018 20:17


Stuff takes 100% ownership of Stuff Fibre
Posted 24-May-2018 19: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.