Hi people, my question seems really simple, but I cannot find an answer, even after searching. I need to find the casenumber in the projectext and connect the employee name to it. I’ll refer to the image numbers.
Nr. 1. Is the project text.
Example: D20160084 Piet K.A. – D1606076 – Bezwaar ingangsdatum uitkering – BIP 30 sep 2016 – 4ME6093
Nr. 2. Are the employees with their employee IDnumbers 01 to 07.
Nr. 3. I need to find a code to extract the casenumber, as seen in the first row. The casenumber D1606076 consists of three parts.
- D16 = year 2016
- 06 = employeenumber
- 076 = number of the case
Nr. 4. I also need to find a code to extract the employee connected to the casenumber, as seen in the first row.
Anyone that can help?:)
- I’m not sure if I can link to the workbook. Please let me know if it is not permitted. Link to workbook:
I don’t know why you require vba for this but the following can easily be translated from worksheet functions to vba code.
The case number can be retrieved with,
=TRIM(MID(SUBSTITUTE(E10, "-", REPT(" ", LEN(E10))), LEN(E10), LEN(E10)))
The employee can be retrieved with,
=INDEX(G$1:G$7, MATCH(MID(E3, 4, 2)&".", F$1:F$7, 0))
For the casenumber you could use in I10:
and for the employee in J10:
drag down as needed.