ExcelHome技术论坛

 找回密码
 免费注册

QQ登录

只需一步,快速开始

快捷登录

搜索
EH技术汇-专业的职场技能充电站 妙哉!函数段子手趣味讲函数 Excel服务器-会Excel,做管理系统 效率神器,一键搞定繁琐工作
HR薪酬管理数字化实战 Excel 2021函数公式学习大典 Excel数据透视表实战秘技 打造核心竞争力的职场宝典
让更多数据处理,一键完成 数据工作者的案头书 免费直播课集锦 ExcelHome出品 - VBA代码宝免费下载
用ChatGPT与VBA一键搞定Excel WPS表格从入门到精通 Excel VBA经典代码实践指南
楼主: 象山海鲜

[原创] 【练习】截取-字符前的字符串【练习已汇总并发布原创】

  [复制链接]

TA的精华主题

TA的得分主题

 楼主| 发表于 2021-5-6 16:34 | 显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用  · 内置多项VBA编程加强工具       ★ 免费下载 ★      ★使用手册
cinlo 发表于 2021-5-6 16:29
是不是要给表里的人发奖??

都已经加过财富了!
能低于24字符可以+1技术分

TA的精华主题

TA的得分主题

发表于 2021-5-6 16:43 | 显示全部楼层
象山海鲜 发表于 2021-5-6 16:34
都已经加过财富了!
能低于24字符可以+1技术分

这得找微软的开发人员做点事了。

TA的精华主题

TA的得分主题

发表于 2021-5-6 17:10 | 显示全部楼层
期待大神佳作
=LEFT(C2,MATCH(45,CODE(MID(C2,ROW($1:$99),1)),)-1)

TA的精华主题

TA的得分主题

发表于 2021-5-6 17:26 | 显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用  · 内置多项VBA编程加强工具       ★ 免费下载 ★      ★使用手册
我在见证历史

TA的精华主题

TA的得分主题

发表于 2021-5-7 15:03 | 显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件       ★免费下载 ★       ★ 使用帮助
太强了,膜拜

评分

1

查看全部评分

TA的精华主题

TA的得分主题

发表于 2021-5-7 15:36 | 显示全部楼层
text第二参数中带【】的看不懂

TA的精华主题

TA的得分主题

发表于 2021-5-7 15:39 | 显示全部楼层
本帖最后由 轩檐 于 2021-5-7 17:51 编辑

膜拜一下海鲜老师,研究的真深。顺便问下老师,为何409和804的年份都是一样,其他可以不一样呢,也是语言环境的问题吗?比如说:[img][/img]
在回复被抓的时候,我知道了不同,用=TEXT(NOW(),"[$-1E020404]mmmm dd yyyy"),就可以出来结果。

这个应该是代码

01 = Western language02 = Arabic Hindi03 = Extend Arabic Hindi04 = Sanskrit05 = Bengali06 = Gorumuchi07 = Gujarati08 = Oriya09 = Tamil0A = Telugu0B = Kannada0C = Malayalam0D = Thai0E = Laotian0F = Tibetan language10 = Burmese11 = Ethiopian12 = Cambodian13 = Mongolian1B = Japanese 11C = Japanese 21D = Japanese 31E = Simplified Chinese 1, Chinese lowercase1F = Simplified Chinese 2, Chinese uppercase20 = Simplified Chinese 3, full-width numbers21 = Traditional Chinese 1, traditional lowercase22 = Traditional Chinese 2, traditional uppercase23 = Traditional Chinese 3, full-width numbers24 = Korean 125 = Korean 226 = Korean 327 = Korean 4++++++++++++++++++++++++++++++++++01 = Gregorian calendar (localization)02 = Gregorian calendar (United States)03 = Japanese calendar (and calendar)04 = Taiwan calendar05 = Korean calendar (Tanji)06 = Hajj (Arab Lunar Calendar)07 = Thai08 = Jewish Calendar09 = Gregorian calendar (Middle Eastern French)11 = Lunar Calendar (Not Officially published)12 = Lunar Calendar (Not Officially published)13 = Lunar Calendar (Not Officially published)0A = Gregorian calendar (Arabic)0B = Gregorian calendar (translated English)0E = Lunar Calendar (Not Officially published)+++++++++++++++++++++++++0401 = Arabic = 10250402 = Bulgarian = 10260403 = Catalan = 10270404 = traditional Chinese) = 10280405 = Czech = 10290406 = Danish = 10300407 = German = 10310408 = Greek = 10320409 = English (United States) = 1033040B = Finnish = 1035040C = French = 1036040D = Hebrew = 1037040E = Hungarian = 1038040F = Icelandic = 10390410 = Italian = 10400411 = Japanese = 10410412 = Korean = 10420413 = Dutch = 10430414 = Norwegian (Birkmer) = 10440415 = Polish = 10450416 = Portuguese (Brazil) = 10460418 = Romanian = 10480419 = Russian = 1049041A = Croatian = 1050041B = Slovak = 1051041C = Albanian = 1052041D = Swedish = 1053041E = Thai = 1054041F = Turkish = 10550420 = Urdu = 10560421 = Indonesian = 10570422 = Ukrainian = 10580423 = Belarusian = 10590424 = Slovenian = 10600425 = Estonian = 10610426 = Latvian = 10620427 = Lithuanian = 10630428 = Tajik = 10640429 = Persian = 1065042A = Vietnamese = 1066042B = Armenian = 1067042C = Azerbaijani (Latin) = 1068042D = Basque = 1069042F = Macedonian = 10710436 = Afrikaans = 10780437 = Georgian = 10790438 = Faroese = 10800439 = Hindi = 1081043A = Maltese = 1082043D = Yiddish = 1085043E = Malay = 1086043F = Kazakh = 10870440 = Kyrgyz = 10880441 = Swahili = 10890442 = Turkmen = 10900443 = Uzbek (Latin) = 10910444 = Proverb = 10920445 = Bengali = 10930446 = Punjabi = 10940447 = Gujarati = 10950448 = Oriya = 10960449 = Tamil = 1097044A = Telugu = 1098044B = Kannada = 1099044C = Malayalam = 1100044D = Assamese = 1101044E = Marathi = 1102044F = Sanskrit = 11030450 = Mongolian = 11040456 = Galician = 11100457 = Gungan = 11110458 = Manipur = 11120459 = Sindhi = 1113045A = Syrian = 1114045B = Sinhalese = 1115045C = Congga = 1116045D = Inuit = 1117045E = Amharic = 1118045F = Tamasic (Berber / Arab) = 11190460 = Kashmiri (Arabic) = 11200461 = Nepali = 11210462 = Frisian = 11220463 = Pashto = 11230464 = Filipino = 11240465 = Dhivehi = 11250466 = Kwa = 11260467 = Furbe = 11270468 = Hausa = 11280469 = Ibibio = 1129046A = Yoruba = 11300470 = Igbo = 11360471 = Kanuri = 11370472 = Kucht = 11380473 = Tigrinya (Ethiopia) = 11390475 = Hawaiian = 11410476 = Latin = 11420477 = Somali = 11430478 = Proverb = 11440804 = Chinese (Simplified) = 20520807 = German (Switzerland) = 20550809 = English (UK) = 20570814 = Norwegian (Nynorsk) = 20680816 = Portuguese (Portugal) = 2070081A = Serbian (Latin) = 2074082C = Azeri (Cyrillic) = 20920843 = Uzbek (Cyrillic) = 21150873 = Tigrinya (Eritrea) = 2163085F = Tamasic (Latin) = 21430C07 = German (Austria) = 30790C09 = English (Australia) = 30810C0A = Spanish = 30820C0C = French (Canada) = 30840C1A = Serbian (Cyrillic) = 30981009 = English (Canada) = 4105+++++++++++++++++++++++++++++++++++++所以,=TEXT(NOW(),"[$-1E020404]mmmm dd yyyy")的结果是May ○七 二○二一
image.png

TA的精华主题

TA的得分主题

发表于 2021-5-7 16:38 | 显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件       ★免费下载 ★       ★ 使用帮助

第一个《 - 》后面只能是单字节字符(数字 字母等)

有两个特例:-后边不能直接跟-或者,(半角逗号或减号);
1、一个逗号不行,多个就可以,或者加其他符号可以;
2、一个减号不行,多个也不行,紧邻第一个减号后边不能为减号;

[$--]、[$-------]不行
[$-,] 不行 [$-,,]可以

评分

2

查看全部评分

TA的精华主题

TA的得分主题

 楼主| 发表于 2021-5-7 16:40 | 显示全部楼层
小書生 发表于 2021-5-7 16:38
第一个《 - 》后面只能是单字节字符(数字 字母等)

有两个特例:-后边不能直接跟-或者,(半角逗号或减 ...

谢谢 测试完善

李逸雪 也有完善大部分情况,请查看帖子
海鲜的TEXT测试
http://club.excelhome.net/thread-1584215-1-1.html

TA的精华主题

TA的得分主题

发表于 2021-5-7 16:49 | 显示全部楼层
好好学习,天天向上,谢谢海鲜版主!!!
您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

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

GMT+8, 2024-11-14 14:25 , Processed in 0.050428 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 1999-2023 Wooffice Inc.

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

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

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