Long time lurker - first time post. I've been trying to figure this out on and off for a couple weeks. It took a bit for me to come crawling out of the shadows. I import claim data on a daily basis at work and one process I still can't figure out how to automate.
Range("J14:M14") is named "ClaimNumber" and can contain one of two things depending on if it's an initial or subsequent claim.
Subsequent - A full claim number (something like 07236-019-152-001 or 07226-009-148-023)
Initial - A claim number ending in xxx (07236-019-152-xxx, 07226-009-148-xxx)
All I need to do is update xxx to 001 if it's an initial claim or update the last three digits to count up one (001 -> 002, 023 -> 024)
I've played around with Application.WorksheetFunction but keep running into various errors and I understand how to accomplish part of this with excel functions outside of VBA. I'll need to use an if statement to change xxx to 001 which shouldn't be that difficult.
Left(ClaimNumber, 14) & Text(Right(ClaimNumber, 3) + 1, "000")
What direction should I head to accomplish this in VBA?
Thanks for looking and hello world!
-Mitchell
Range("J14:M14") is named "ClaimNumber" and can contain one of two things depending on if it's an initial or subsequent claim.
Subsequent - A full claim number (something like 07236-019-152-001 or 07226-009-148-023)
Initial - A claim number ending in xxx (07236-019-152-xxx, 07226-009-148-xxx)
All I need to do is update xxx to 001 if it's an initial claim or update the last three digits to count up one (001 -> 002, 023 -> 024)
I've played around with Application.WorksheetFunction but keep running into various errors and I understand how to accomplish part of this with excel functions outside of VBA. I'll need to use an if statement to change xxx to 001 which shouldn't be that difficult.
Left(ClaimNumber, 14) & Text(Right(ClaimNumber, 3) + 1, "000")
What direction should I head to accomplish this in VBA?
Thanks for looking and hello world!

-Mitchell