0

I have very little vba experience or coding background, but I'm starting to teach myself. What I'm attempting to write and hopefully implement using MS Excel or Access is a coding program that takes a part number (INPUT PART#) and based on a set of criteria creates a unique item number as shown below. I've seen something similar done in PHP, but I do not know how to write PHP. Based on the Input part number the coding script would need to be dynamic enough to identify the alpha-numeric sequence and then re-format to the corresponding Unique # layout. I just need a sample code to get me started.

Any help would be greatly appreciated. Thank you in advance!

INPUT PART# *data in input file
GDA-500MA (1) GDA-6.3A (2) GDA-630mA (3)
GLR-12 (4) GLR-3 (5) GMA-1.25-R(6) GMA-100-R (7)

UNIQUE PART# *converted format GMC(X)MA (1) GDA(X)A (2) GMC(X)MA (3) GLR (4) GLR (5) GMA(x)R (6) GMA(x)R (7)

Community
  • 1
  • 1
athoch71
  • 3
  • 4
  • looks like youre going to be pulling out your hair trying to figure out how to string 'hack and slash' this. – Doug Coats Jun 26 '18 at 15:49

1 Answers1

1

I would suggest starting with system.security.cryptography as this is where I started when I started to teach myself encoding and decoding. That could give you a start on what you are looking for

A couple of links to help you: https://en.wikibooks.org/wiki/Visual_Basic_for_Applications/String_Hashing_in_VBA

VBA hash string <- this is what I used

Other than that I suggest you brush up on some string manipulation like how to find specific characters in a string and being able to extract that.

https://excelmacromastery.com/vba-string-functions/ <- this might help you out.

Hope this helps you get started

Sebic0
  • 40
  • 8