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

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
BulldogMikeAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saqib Husain, SyedEngineerCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BulldogMikeAuthor Commented:
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
Saqib Husain, SyedEngineerCommented:
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
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

BulldogMikeAuthor Commented:
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
BulldogMikeAuthor Commented:
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
Saqib Husain, SyedEngineerCommented:
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
BulldogMikeAuthor Commented:
Your answer is acceptable - you got the 500 points and an A grade

Thank You

Mike
0
Saqib Husain, SyedEngineerCommented:
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
BulldogMikeAuthor Commented:
A close request is pending on this answer
0
Saqib Husain, SyedEngineerCommented:
Re-accept
0
BulldogMikeAuthor Commented:
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
Saqib Husain, SyedEngineerCommented:
You again did not do it correctly. You should accept on the FIRST answer.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.