在
B&amp列中共享两个相关目标。 D.
启动数据包含四个变量:一个,两个,三个,四个,每个变量可能具有变量 value (ex:One:one: a 强>)虽然始终需要变量名称的值并存在,但对于两个,三和四的变量可能不存在值。他们可以是空白的。
除了在最近的日期进行排序之外,公式还将
- 删除变量名称和空间(例如:“一个:”),仅留下变量值。
- 插入& , on 在变量之间(ex One & on fort 四)
- 删除额外的白色空间或当不存在两个,三个,四个的值时,结果逗号。这些显示在A5:A7
目标#1:启动数据中显示在A&该数据的目标显示在B列B中。
目标#2: A列中的相同启动数据,以及第D列中的目标。这与上面的额外功能相似taht日期放在字符串的开头(因此,“未插入”一词)
C2中的以下公式使我成为目标#1的一部分,除了它在最近的日期之前没有
ARRAYFORMULA(TRIM(SUBSTITUTE(REGEXREPLACE(
SUBSTITUTE
(SUBSTITUTE
(SUBSTITUTE
(SUBSTITUTE
(SUBSTITUTE
(SUBSTITUTE(
A2:A10
,"One: ",""), ", two: ", " "&CHAR(64)&" "), ", three: "," "), ", four: "," on "),"four:","")," "&CHAR(64)&" ,",""),
"\s\s"," "),",","")))
排序我不确定如何在单元格内部以降序顺序对该数据集进行排序。
我确实认为这可能涉及分配日期,我认为公式的替代功能会重新排序字符串,以便日期出现在每行的前面而不是末尾。
共享的表在这里:
谢谢您的帮助!
In this shared sheet with multiple lines in one individual cell, I am trying to display the formula result by date by descending date order (ie most recent date first 2022, 2021 etc) inside of each cell.
Two related goals are shared in Columns B & D.

The starting data includes four variables: One, two, three, four, and each may have a variable value (ex: One: A) while a value for variable name One is always required and present, values may not be present for variables two, three and four. They can be blank.
In addition to sorting by most recent date, the formulas will also
- remove the variable names and trailing colon and space (ex: "One: ")leaving only variable values.
- insert &, on between variables (ex One & two three on four)
- remove extra white spaces or commas that result when values are not present for two, three, four. These are displayed in A5:A7
Goal #1: Starting data is displayed in Column A & the Goal for this data is displayed in Column B.
Goal #2: Same starting data in Column A, and Goal in Column D. This is similar to the above with one extra function that reorders the string so taht the date is placed in the beginning of the string (as a result the word "on" is not inserted)
The following formula in C2 has taken me part of the way for Goal #1 except it did not sort by most recent date
ARRAYFORMULA(TRIM(SUBSTITUTE(REGEXREPLACE(
SUBSTITUTE
(SUBSTITUTE
(SUBSTITUTE
(SUBSTITUTE
(SUBSTITUTE
(SUBSTITUTE(
A2:A10
,"One: ",""), ", two: ", " "&CHAR(64)&" "), ", three: "," "), ", four: "," on "),"four:","")," "&CHAR(64)&" ,",""),
"\s\s"," "),",","")))
But I'm not sure how I would go about sorting this dataset in descending order inside of a cell.
I do think that it might involve Splitting the dates and I think an alternative function of the formula would reorder the string so that the date appears in the front of each line instead of at the end.
The shared sheet is here: https://docs.google.com/spreadsheets/d/1pDqt-jfwmvo7bYuenjcWhrKJh6iqGF6pajUd6egCj0I/edit#gid=0
Thank you in advance for your help!
发布评论
评论(1)
尝试:
更新:
try:
update: