Guess, I could add that I've used:

Concatenate ("0000",A1) to give me all my zeros.
Right (A2,5) function, to reduce the number to just the five digits, or six 
to give me six digits.
Then I've used Concatenate ("AB",A1) which will give me all of these 
numbers, EXCEPT the six digit ones.
I can't seem to find a way to add the AB to the five digit numbers without 
ALSO adding it to the six digit ones.

Conversely, If I just add the AB to everything, then Left (A2, 6), then all 
my AB numbers become just B numbers.
Maybe a formula to search for B & add A automatically?
Also, While I can just copy the column and paste values, I'd PREFER the 
numbers to already be numbers and not formulas looking like numbers. 
(That's not a biggie, but would be nice.)

On Wednesday, February 10, 2016 at 4:27:58 PM UTC-8, Paul Bevins wrote:

> Hi, I've got an odd problem.
>
> I have a database of some 15000 numbers.
>
> 10,000 of them (roughly), go from 1 to 10,000.
> Another 5,000 go from 1,000,000 to 2,000,000.
>
> However, the numbers SHOULD AB00001 to AB10000.
>
> I need to be able to type the root number in and have Excel decide what it 
> needs:
>
> 1         = AB00001   (7 digits)
> 22       = AB00022   (7 digits)
> 333     = AB00333   (7 digits)
> 4444   =AB04444   (7 digits)
> 15555 = AB15555   (7 digits)  (excusing that this number won't exist above 
> 10,000, but five digits.)
> 100001 = 100001   (6 digits)
> 200002 = 200002  (same length at 6 digits)
>
> I have searched around quite a bit, but have been unable to find the terms 
> to search for to get these answers.
> I'm beginning to think I'll need to do it with a VBA script, but am open 
> to any simple method of doing it, since I type these numbers dozens of 
> times a day,
>
> Anyone have any ideas?
>
> Thanks in advance for any help
>
> Paul
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at https://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Reply via email to