Ask Your Question
0

Removing excess information from a calc cell

asked 2018-05-11 22:34:24 +0200

stuarts.burgers gravatar image

updated 2020-09-24 23:01:20 +0200

LeroyG gravatar image

I have a Column of Street Numbers that include unit/flat number as per below

2,
4,
5,
7,
7,
10,
17,
17,
18,
18,
1/1,
11B,
12A,
16A,
2/1,
3/1,
9A,

I need strip off the Flat Number with the /, ie 2/1 I need to show as 1,

I have used Column to Text "other" with a string of A B C etc to remove the Unit Letters but how do I remove the flat numbers and the /. The flat numbers could be one or two digits.

(A little edit to format data by LeroyG)

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-09-24 23:35:36 +0200

LeroyG gravatar image

updated 2020-09-24 23:35:57 +0200

If data are in the range A1:An, use =REGEX(A1;"[0-9]*/|[A-Z]";""), and copy this formula until the n row.

  • [0-9]*/ for to remove unit/.
  • [A-Z] for to remove unit letters.

LibreOffice Help on REGEX function.

ICU Regular Expressions page.


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 (Correct answer mark) to the left of the answer that solves your question.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-05-11 22:34:24 +0200

Seen: 37 times

Last updated: Sep 24