user1227124
user1227124

Reputation: 369

Split a cell into 2 taking into consideration the cells have different length of characters

eg 1 27935.0 12.11.2018 to 31.12.9999

eg 2 6240.0 12.11.2018 to 31.12.9999

I want to split the price from the valid to/from dates so that column 1 contains the price and column 2 contains the dates.

If the price was the same amount of digits i'd use Text to Columns but I am unsure as the prices have different amount of digits.

enter image description here

Upvotes: 0

Views: 103

Answers (1)

nbixler
nbixler

Reputation: 532

If you format the days and months uniformly with two digits (e.g. April as 04), you can get the string length len(), then use the last 24 (did I count correctly?) characters from the string to the new column.

You can also break the string by spaces " " and go from there (https://exceljet.net/formula/split-text-string-at-specific-character)

Something like this may be helpful at giving you additional ideas: https://www.ablebits.com/office-addins-blog/2016/06/01/split-text-string-excel/

Upvotes: 1

Related Questions