Solved

Number Manipulation - adding a space and two zeros at the end

Posted on 2012-04-12
13
278 Views
Last Modified: 2012-04-14
Hi

I want to edit a number like this 21 25 00 10 in cell H11.  

If the this number is less than 10 digits long (or 14 digits with the spaces), I want to add a space and two zeros at the end of 21 25 00 10 to get 21 25 00 10 00.   Then, I want to store the new value in the cell H11 if possible or in another cell if not possible for reference later.

Which function or functions would I use to convert this number from 10 digits to 12 (or from 14 digits to 17 digits with the spaces)?

Thank you for looking at this question  

Mike
0
Comment
Question by:BulldogMike
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
13 Comments
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 500 total points
ID: 37839638
To make it 14 digits use this formula in "another" cell

=A1&RIGHT(" 00 00 00 00",14-LEN(A1))

change the 14 to 17 or to 21.
0
 

Author Comment

by:BulldogMike
ID: 37839671
Thanks SSAQIBH

It works - If I want to make it conditional how would that be coded

IF A1 LEN <12, A1&RIGHT(" 00 00 00 00",14-LEN(A1)), false condition ?

Thanks
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 37839699
You do not have to use an if statement.

If the number is 14 it will take care of 14 as well as 11 as well as 7.
If the number is 17 it will take care of 17 as well as 14 as well as 11.
If the number is 21 it will take care of 21 as well as 17 as well as 14.
0
Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 

Author Comment

by:BulldogMike
ID: 37839711
Yes but it adds extra zeros to the right which I don't know if that will work for my application.
I am accepting your 1st answer as the solution and awarding you the points

Thanks You

Mike
0
 

Author Comment

by:BulldogMike
ID: 37839764
I've requested that this question be closed as follows:

Accepted answer: 0 points for BulldogMike's comment #37839671

for the following reason:

well reasoned response
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 37839718
Do not close this until you are satisfied with the answer. Take your time to check it out. Close it when you have 100% of what you need.
0
 

Author Comment

by:BulldogMike
ID: 37839725
Your answer is acceptable - you got the 500 points and an A grade

Thank You

Mike
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 37839738
In that case: You did not accept my comment. You have accepted your own. You will have to go back and re-accept my comment.
0
 

Author Comment

by:BulldogMike
ID: 37839754
A close request is pending on this answer
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 37839765
Re-accept
0
 

Author Comment

by:BulldogMike
ID: 37845511
I've requested that this question be closed as follows:

Accepted answer: 0 points for BulldogMike's comment #37839671

for the following reason:

well reasoned answer
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 37845512
You again did not do it correctly. You should accept on the FIRST answer.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question