I need a function that will look at file names and based on values in the file name, return different named values such as Comment Form, Completed Comment Form, Combined Comment Form and Document.
I have looked at CASE, but I'm not quite sure what to do.
If a file name has CST and "-Combined." (example: AAA-ABC-XY-CST-001-01-Comb
ined.doc) then it is a Combined Comments file.
If a file name has CST and there is nothing before the period in the file name (ABC-XY-CST-001-01.doc) then it is a blank Comment Form.
If a file name has CST and there IS something other than 01, 02, etc. before the period in the file name (ABC-XY-CST-001-01-John.do
then it is Comment Completed Form.
The file names are:
Major Project Acronym 3 letters (AAA)
project acronyms of varying length(ABC, CDEF, LMNOP)
document type of varying length (XY, WXYZ, VONOM)
some of the files have CST and but will also get various additions to the name (see below) but some don't have CST
three numbers 001, 002, 003, etc.
two numbers 01, 02, 02
some of the CST files have something before the period
three to four letter document extension (.doc, .xls, .xlsm)