Need help with formula. - perhaps wildcard and a mix of indirect?

JDJong

New Member
Joined
May 2, 2018
Messages
39
Hi,

need to automize the description based 3 criteria.
- Personnel number (#3 and #4 are letters short for department)
- Personnel code (random)
- Appointed period

would like to have the description within such format: e.g:Finance_Department_01.01- 01.07.2012_PN_876789 (Indicated in red)

[TABLE="width: 1025"]
<colgroup><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]01FI000389[/TD]
[TD="align: right"]876789[/TD]
[TD]01.01.2012-01.07.2012[/TD]
[TD][/TD]
[TD]FI (fInance department)[/TD]
[TD]Finance_Department_01.01- 01.07.2012_PN_876789[/TD]
[/TR]
[TR]
[TD]01FI000390[/TD]
[TD]A23123[/TD]
[TD]01.05.2016-01.11.2016[/TD]
[TD][/TD]
[TD]FI (fInance department)[/TD]
[TD]Finance_Department_01.05- 01.11.2016_PN_A23123[/TD]
[/TR]
[TR]
[TD]01FI000391[/TD]
[TD="align: right"]767890[/TD]
[TD]09.01.2018-09.07.2018[/TD]
[TD][/TD]
[TD]FI (fInance department)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]02QC000340[/TD]
[TD="align: right"]878788[/TD]
[TD]09.01.2018-09.07.2019[/TD]
[TD][/TD]
[TD]QC (Quality control)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]02QC000341[/TD]
[TD="align: right"]345434[/TD]
[TD]09.01.2018-09.07.2020[/TD]
[TD][/TD]
[TD]QC (Quality control)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]02QC000342[/TD]
[TD="align: right"]876789[/TD]
[TD]09.01.2018-09.07.2021[/TD]
[TD][/TD]
[TD]QC (Quality control)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]03MI000425[/TD]
[TD="align: right"]989870[/TD]
[TD]09.01.2018-09.07.2022[/TD]
[TD][/TD]
[TD="colspan: 2"]MI (Maintenance department)[/TD]
[/TR]
[TR]
[TD]03MI000426[/TD]
[TD="align: right"]678768[/TD]
[TD]09.01.2018-09.07.2023[/TD]
[TD][/TD]
[TD="colspan: 2"]MI (Maintenance department)[/TD]
[/TR]
[TR]
[TD]03MI000427[/TD]
[TD="align: right"]565456[/TD]
[TD]09.01.2018-09.07.2024[/TD]
[TD][/TD]
[TD="colspan: 2"]MI (Maintenance department)[/TD]
[/TR]
[TR]
[TD]10SR000001[/TD]
[TD="align: right"]989899[/TD]
[TD]09.01.2018-09.07.2025[/TD]
[TD][/TD]
[TD="colspan: 2"]SR (Senior Management)[/TD]
[/TR]
[TR]
[TD]10SR000002[/TD]
[TD="align: right"]898989[/TD]
[TD]09.01.2018-09.07.2026[/TD]
[TD][/TD]
[TD="colspan: 2"]SR (Senior Management)[/TD]
[/TR]
[TR]
[TD]10SR000003[/TD]
[TD="align: right"]787878[/TD]
[TD]09.01.2018-09.07.2027[/TD]
[TD][/TD]
[TD="colspan: 2"]SR (Senior Management)[/TD]
[/TR]
[TR]
[TD]11BD000333[/TD]
[TD="align: right"]888989 [/TD]
[TD]09.01.2018-09.07.2028[/TD]
[TD][/TD]
[TD]BD (Board of Director)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11BD000334[/TD]
[TD="align: right"]998989[/TD]
[TD]09.01.2018-09.07.2029[/TD]
[TD][/TD]
[TD]BD (Board of Director)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11BD000335[/TD]
[TD="align: right"]656567[/TD]
[TD]09.01.2018-09.07.2030[/TD]
[TD][/TD]
[TD]BD (Board of Director)[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Please provide inputs. Thanks
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Why is the year missing from the first date? That doesnt make sense really as many entries cover more than one year.
 
Upvote 0
If it is within the same year, it is not necessary to have the first date entered.

That would make it a much longer formula than this:

=PROPER(SUBSTITUTE(SUBSTITUTE(MID(E1,FIND("(",E1)+1,999),")","")," ","_"))&"_"&C1&"_PN_"&B1
 
Upvote 0
That would make it a much longer formula than this:

=PROPER(SUBSTITUTE(SUBSTITUTE(MID(E1,FIND("(",E1)+1,999),")","")," ","_"))&"_"&C1&"_PN_"&B1


Looks quite advanced ... apologies, the Appointed period (C) are splited into 2 columns : Appointed since and Appointed until.

how should I alter the formula?

Thanks
 
Upvote 0
The bit where it says

&C1&

change to

&C1&"-"&D1&


I have entered the following formula:

=PROPER(SUBSTITUTE(SUBSTITUTE(MID(AF4;FIND("(";AF4)+1,999);")";"");" ";"_"))&"_"&Z4 - AA4&"_PN_"&A4

It says i have entered too many arguements?

anything i add in extra?
 
Upvote 0
Try this:

=PROPER(SUBSTITUTE(SUBSTITUTE(MID(AF4;FIND("(";AF4)+1;999);")";"");" ";"_"))&"_"&Z4&"-"&AA4&"_PN_"&A4
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,246
Members
452,623
Latest member
cliftonhandyman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top