Skip to main content
Question

Looking to extract data from a text field


Forum|alt.badge.img+4

Hi all,

I'm looking for a way to extract text from the middle of a text field where there's a match to data in another field. As an example say I have a record with a field for Tax Year Ending which will be 4 digits i.e. 2021 or 2022 etc.

I need to use that field to find matches in another field which will have an ID number followed by a / and then a tax year, but it can have more than one of these.

For example if this other field (let's call it Summary) contains the following:

"16/2023 ; 9/2022"

And the Tax Year Ending in the record is 2022, I need another field to extract "9" from the Summary. If the Tax Year Ending was 2023 then it would need to extract "16" from the Summary.

If it's easier to do then it could extract "9/2022" or "16/2023" respectively but it would be cleaner to skip that step if possible.

Many Thanks,

Joe



------------------------------
Joe Alderson
------------------------------

This topic has been closed for replies.

Forum|alt.badge.img+20

Can we assume the Summary field will only contain one instance of each year? Meaning, this will never occur: "16/2023 ; 9/2023; 19/2022"

Where we have two instances of 2023?

And what are the max number of parts in the summary field? Will you ever have 50 or 60 parts? Or always say, less than 15?

------------------------------
Mike Tamoush
------------------------------