Excel精英培训网

 找回密码
 注册
数据透视表40+个常用小技巧,让你一次学会!
查看: 3060|回复: 4

[通知] 字串连接

[复制链接]
发表于 2008-5-21 18:48 | 显示全部楼层 |阅读模式
有没有一个公式能连接一个区域或数组里的所有内容,CONCATENATE函数好象只能一个一个的引用,要能CONCATENATE(A1:C5)这样就好了.
发表于 2008-5-21 18:54 | 显示全部楼层
回复

使用道具 举报

发表于 2008-5-21 19:28 | 显示全部楼层

Function MyCon(rng As Range) As String<br/>Dim str As String<br/>&nbsp;&nbsp;&nbsp; For Each c In rng<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; str = str &amp; Chr(10) &amp; c.Value<br/>&nbsp;&nbsp;&nbsp; Next<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MyCon = Right(str, Len(str) - 1)<br/>End Function
[此贴子已经被作者于2008-5-21 19:28:46编辑过]
回复

使用道具 举报

 楼主| 发表于 2008-5-22 08:35 | 显示全部楼层

<p>谢谢,我不想用VBA,它很能,但有时不方便</p>
回复

使用道具 举报

发表于 2010-8-10 17:40 | 显示全部楼层

路过,学习一下
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )

GMT+8, 2024-5-19 13:28 , Processed in 0.333414 second(s), 7 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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