View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
dman[_2_] dman[_2_] is offline
external usenet poster
 
Posts: 10
Default How to Genarate random letter

Using the count, try this....

Letter = Chr(Count + 64)

"Ed Dror" wrote in message
...
Hi there,

I have a file look like this

VendorID (A1) and FileName (B1)
Look like this

9287 C:\myfilename.txt
9287 C:\myfilename.xls
9287 C:\myfilenamepdf
9287 C:\myfilename2.txt
9287 C:\myfilename.jpg
9283 C:\myfilename.jpg
9283 C:\myfilename.jpg

As you can see some vendors has 5 files and some 2 or 3 or 8 (15 files
max)
All of the VendorID has 4 digit only

Because VendorID is duplicate I need to create a unique ID
So I'm thinking to add a letter at the end of the vendorId
Looks like this (new C1)

9287A
9287B
9287C
9287D
9287E
9283A
9283B

How do I add a with VBA function that assign the exact
letter based on count VendorID

Thanks,
Ed Dror
Andrew Lauren Co.