Copying only part of a formula from one column into the formula of another.

I’ll give the “Why” below, but my question is this: Is there a formula available that will fill in Column 1 with the last numerical digits of Column 2?

Example

Why: I am trying to get the total average of a list that contains items that are often duplicated. Column 2 currently shows the sum of the duplicates and I’m trying to give that sum a name using the final title given in its final sequence. (For example, B204-B207 all have the same basic name with a few minor differences, i.e. Libreoffice, LibreOffice, L1breOff1ce, etc.)

Thank you.

EDIT (2020-11-09): A more elegant formula:

For A4962: use =INDIRECT(CONCAT("A";REGEX(FORMULA(B4962);"[0-9]{3}"; ;2)))

LibreOffice Help on REGEX (until here the edit).

For A4962: use =INDIRECT(CONCAT("A";T(MID(FORMULA(B4962);SEARCH(":";FORMULA(B4962))+2;LEN(FORMULA(B4962))-SEARCH(":";FORMULA(B4962))-2))))

See sample file.

See LibreOffice Help on INDIRECT, CONCAT, T, MID, FORMULA, SEARCH, LEN.

Tested with LibreOffice 6.4.7.2 (x86); OS: Windows 6.1.


Add Answer is reserved for solutions.

Press edit below your question if you want to add more information; also can comment an answer.

Check the mark (Answer markCorrect answer mark) to the left of the answer that solves your question.