ExcelHome技术论坛

 找回密码
 免费注册

QQ登录

只需一步,快速开始

快捷登录

搜索
EH技术汇-专业的职场技能充电站 妙哉!函数段子手趣味讲函数 Excel服务器-会Excel,做管理系统 Excel Home精品图文教程库
HR薪酬管理数字化实战 Excel 2021函数公式学习大典 Excel数据透视表实战秘技 打造核心竞争力的职场宝典
300集Office 2010微视频教程 数据工作者的案头书 免费直播课集锦 ExcelHome出品 - VBA代码宝免费下载
用ChatGPT与VBA一键搞定Excel WPS表格从入门到精通 Excel VBA经典代码实践指南
查看: 2186|回复: 2

[原创] mxqchina应助中学到的-Excel2016新函数textjoin应用

[复制链接]

TA的精华主题

TA的得分主题

发表于 2016-4-2 12:48 | 显示全部楼层 |阅读模式
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用  · 内置多项VBA编程加强工具       ★ 免费下载 ★      ★使用手册
本帖最后由 mxqchina 于 2016-4-2 16:03 编辑

如何将一个单元格内的数字倒置?先谢谢各位老师了!!!(已解决)
http://club.excelhome.net/thread-1269017-1-1.html
(出处: ExcelHome技术论坛)

此贴中,坛友哭泣的数字需要讲形如123454545这样的数据变为545454321这样,如下是2楼给出数组公式:

  1. =TEXT(SUMPRODUCT(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)*10^(ROW(INDIRECT("1:"&LEN(A1)))-1)),REPT(0,LEN(A1)))
复制代码


excel2016在今天上线后,增加了新的函数TEXTJOIN,超级强大,在也可以不用vba了,且支持数组。

看看新版公式缩短多少,且支持文本型,长度也轻松突破15位。

=TEXTJOIN(,TRUE,MID(A1,100-ROW($1:$99),1))


TEXTJOIN系统帮助如下,供参考。

TEXTJOIN functionThis article describes the formula syntax and usage of TEXTJOIN, one of the text functions in Microsoft Excel.
Important: This function is available if:

  • You are an Office 365 subscriber and have the latest version of Office installed on your PC.
  • You are using Excel Online.
  • You are using Excel Mobile.
  • You are using Excel for Android phones and tablets.
DescriptionThe TEXTJOIN function combines the text from multiple ranges and/or strings, and includes a delimiter you specify between each text value that will be combined. If the delimiter is an empty text string, this function will effectively concatenate the ranges.
SyntaxTEXTJOIN(delimiter, ignore_empty, text1, [text2], …)
[td]
argument            
Description            
delimiter               
(required)
A text string, either empty, or one or more characters enclosed by double quotes, or a reference to a valid text string.  If a number is supplied, it will be treated as text.
ignore_empty               
  (required)
If TRUE, ignores empty cells.
text1               
(required)
Text item to be joined.  A text string, or array of strings, such as a range of cells.
[text2, ...]               
(optional)
Additional text items to be joined.  There can be a maximum of 252 text arguments for the text items, including text1. Each can be a text string, or array of strings, such as a range of cells.
For example, =TEXTJOIN(" ",TRUE, "The", "sun", "will", "come", "up", "tomorrow.") will return The sun will come up tomorrow.
Remarks
  • If the resulting string exceeds 32767 characters (cell limit), TEXTJOIN returns the  #VALUE! error.
ExamplesCopy the example data in each of the following tables, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data.

评分

1

查看全部评分

TA的精华主题

TA的得分主题

 楼主| 发表于 2016-4-2 12:51 | 显示全部楼层
再增加一个类似vba函数里的split函数就好了。

TA的精华主题

TA的得分主题

发表于 2018-4-5 17:54 | 显示全部楼层
textjoin解决了文本型内存数组合并的函数难点
但这题用另一个concat会更简洁
您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

关闭

最新热点上一条 /1 下一条

手机版|关于我们|联系我们|ExcelHome

GMT+8, 2024-4-20 20:51 , Processed in 0.043840 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 1999-2023 Wooffice Inc.

沪公网安备 31011702000001号 沪ICP备11019229号-2

本论坛言论纯属发表者个人意见,任何违反国家相关法律的言论,本站将协助国家相关部门追究发言者责任!     本站特聘法律顾问:李志群律师

快速回复 返回顶部 返回列表