当前位置: 首页 > news >正文

网站备案后换空间seo网站优化培训找哪些

网站备案后换空间,seo网站优化培训找哪些,做教育类seo网站靠谱吗,wordpress交互插件系列文章目录 文章目录 系列文章目录前言一、按需求计数单元格数量1.需求 二、使用步骤1.vba源码2.整理后 总结 前言 一、按需求计数单元格数量 1.需求 一个表中有多个类型的单元格内容,比如:文字、数字、特殊字符、字母数字…… 我们要计数字母数字的…

系列文章目录

文章目录

  • 系列文章目录
  • 前言
  • 一、按需求计数单元格数量
    • 1.需求
  • 二、使用步骤
    • 1.vba源码
    • 2.整理后
  • 总结


前言

一、按需求计数单元格数量

1.需求

一个表中有多个类型的单元格内容,比如:文字、数字、特殊字符、字母+数字……
我们要计数字母+数字的单元格数量
同时提取字母+数字单元格的数字部分,判断数字部分是否相同,然后计数不同的单元格数量

二、使用步骤

1.vba源码

代码如下(示例):

Sub CountSpecificFormatStrings()Dim rng As RangeDim cell As RangeDim count, countkey As IntegerDim regex, regex1 As ObjectDim cellAddress As StringDim numbers As StringDim matches As ObjectDim match As VariantDim cellNumber As StringDim cellValue As StringDim myCollection As CollectionSet myCollection = New CollectionDim value As VariantDim lastValue As VariantDim uniqueCount As IntegerDim ws As WorksheetSet ws = ActiveSheetDim cellValueCollection As CollectionDim i, j, k As IntegerDim valueToAdd As StringDim key As VariantDim dict As ObjectDim myArray As VariantDim item, ele As VariantDim elements As VariantDim uniquekeys As New CollectionuniqueCount = 0lastValue = ""Set cellCollection = New CollectionSet dict = CreateObject("Scripting.Dictionary")' 设置要检查的范围Set rng = ws.Range("A3:DR200") ' 假设我们在Sheet1的A1:A10范围内查找count = 0' 创建正则表达式对象Set regex = CreateObject("VBScript.RegExp")' 设置正则表达式模式:一个字母后面跟随任意数量的数字' 这里的模式是 [A-Za-z][0-9]+,其中 [A-Za-z] 匹配任意一个字母,[0-9]+ 匹配一个或多个数字With regex.Global = True.IgnoreCase = True.pattern = "[A-Za-z][0-9]+"End With' 创建正则表达式对象Set regex1 = CreateObject("VBScript.RegExp")' 设置正则表达式模式:一个字母后面跟随任意数量的数字' 这里的模式是 [A-Za-z][0-9]+,其中 [A-Za-z] 匹配任意一个字母,[0-9]+ 匹配一个或多个数字With regex1.Global = True.IgnoreCase = True.pattern = "\d+"End With' 遍历单元格For Each cell In rngIf regex.Test(cell.value) Then ' 如果单元格匹配正则表达式count = count + 1 ' 增加计数Debug.Print "行:" & cell.Row & ",列:" & cell.Column & ",值:" & cell.value'Set matches = regex1.Execute(cell.Value)'For Each match In matches'outputString = outputString & match.Value'Debug.Print outputString'Next match'Debug.Print cell.Row & cell.Column'Debug.Print Cells(cell.Row, cell.Column).ValueSet matches = regex1.Execute(Cells(cell.Row, cell.Column).value)For Each match In matchesmyCollection.Add matchNext matchEnd IfNext cellFor Each item In myCollection'Debug.Print itemNextcountkey = myCollection.countFor i = myCollection.count To 1 Step -1For j = 1 To i - 1If myCollection(i) = myCollection(j) ThenmyCollection.Remove (i)countkey = countkey - 1Exit ForEnd IfNext jNext iFor Each ele In myCollectionDebug.Print eleNext elews.Cells(2, 69).value = countkey' 显示计数结果MsgBox "有 " & countkey & " 个单元格符合指定格式。"
End Sub

2.整理后

代码如下(示例):

Sub CountSpecificFormatStrings()Dim rng As RangeDim cell As RangeDim count, countkey As IntegerDim regex As ObjectDim matches As ObjectDim match As VariantDim myCollection As CollectionSet myCollection = New CollectionDim ws As WorksheetSet ws = ActiveSheetDim i, j As IntegerDim key As VariantDim item, ele As Variant' 设置要检查的范围Set rng = ws.Range("A3:DR200") ' 假设我们在Sheet1的A1:A10范围内查找count = 0' 创建正则表达式对象Set regex = CreateObject("VBScript.RegExp")' 设置正则表达式模式:一个字母后面跟随任意数量的数字' 这里的模式是 [A-Za-z][0-9]+,其中 [A-Za-z] 匹配任意一个字母,[0-9]+ 匹配一个或多个数字With regex.Global = True.IgnoreCase = True.pattern = "[A-Za-z][0-9]+"End With' 创建正则表达式对象Set regex1 = CreateObject("VBScript.RegExp")' 设置正则表达式模式:一个字母后面跟随任意数量的数字' 这里的模式是 [A-Za-z][0-9]+,其中 [A-Za-z] 匹配任意一个字母,[0-9]+ 匹配一个或多个数字With regex1.Global = True.IgnoreCase = True.pattern = "\d+"End With' 遍历单元格For Each cell In rngIf regex.Test(cell.value) Then ' 如果单元格匹配正则表达式count = count + 1 ' 增加计数Debug.Print "行:" & cell.Row & ",列:" & cell.Column & ",值:" & cell.value'Set matches = regex1.Execute(cell.Value)'For Each match In matches'outputString = outputString & match.Value'Debug.Print outputString'Next match'Debug.Print cell.Row & cell.Column'Debug.Print Cells(cell.Row, cell.Column).ValueSet matches = regex1.Execute(Cells(cell.Row, cell.Column).value)For Each match In matchesmyCollection.Add matchNext matchEnd IfNext cellFor Each item In myCollection'Debug.Print itemNextcountkey = myCollection.countFor i = myCollection.count To 1 Step -1For j = 1 To i - 1If myCollection(i) = myCollection(j) ThenmyCollection.Remove (i)countkey = countkey - 1Exit ForEnd IfNext jNext iFor Each ele In myCollectionDebug.Print eleNext elews.Cells(2, 69).value = countkey' 显示计数结果MsgBox "有 " & countkey & " 个单元格符合指定格式。"
End Sub

总结

分享:
读过的书是不是有很多不记得了,但是它一直都是潜在的,它在我们的出言有尺上,嬉闹有度上,做事有余上,说话有德上


文章转载自:
http://matinee.c7624.cn
http://worthily.c7624.cn
http://castrative.c7624.cn
http://alky.c7624.cn
http://perquisition.c7624.cn
http://chiaus.c7624.cn
http://zymic.c7624.cn
http://metier.c7624.cn
http://exoskeleton.c7624.cn
http://welterweight.c7624.cn
http://newsman.c7624.cn
http://goniotomy.c7624.cn
http://stadtholder.c7624.cn
http://premiss.c7624.cn
http://areographic.c7624.cn
http://frigorific.c7624.cn
http://hepatomegaly.c7624.cn
http://watermanship.c7624.cn
http://perlocutionary.c7624.cn
http://bushbeater.c7624.cn
http://pashalic.c7624.cn
http://caribou.c7624.cn
http://rosarian.c7624.cn
http://owing.c7624.cn
http://hyperacid.c7624.cn
http://polycrystal.c7624.cn
http://sower.c7624.cn
http://scurrilously.c7624.cn
http://heathfowl.c7624.cn
http://plimsoll.c7624.cn
http://lowborn.c7624.cn
http://feat.c7624.cn
http://jaycee.c7624.cn
http://fishfall.c7624.cn
http://kisan.c7624.cn
http://hypocaust.c7624.cn
http://lives.c7624.cn
http://rudest.c7624.cn
http://pepperbox.c7624.cn
http://hektoliter.c7624.cn
http://arbitrageur.c7624.cn
http://muscone.c7624.cn
http://coaly.c7624.cn
http://spirogyra.c7624.cn
http://decillion.c7624.cn
http://burnsides.c7624.cn
http://davao.c7624.cn
http://tokio.c7624.cn
http://wae.c7624.cn
http://psychosis.c7624.cn
http://maleate.c7624.cn
http://hypophysiotrophic.c7624.cn
http://nonsked.c7624.cn
http://comparator.c7624.cn
http://reticulated.c7624.cn
http://blowfly.c7624.cn
http://icarus.c7624.cn
http://hereditarian.c7624.cn
http://incent.c7624.cn
http://palliative.c7624.cn
http://periphrasis.c7624.cn
http://sac.c7624.cn
http://tuberculin.c7624.cn
http://corncrake.c7624.cn
http://persalt.c7624.cn
http://floatplane.c7624.cn
http://kindred.c7624.cn
http://indelibility.c7624.cn
http://fundamentally.c7624.cn
http://hunkey.c7624.cn
http://jiggered.c7624.cn
http://caul.c7624.cn
http://bull.c7624.cn
http://helihop.c7624.cn
http://dragsaw.c7624.cn
http://confidential.c7624.cn
http://predatory.c7624.cn
http://omit.c7624.cn
http://tambura.c7624.cn
http://jadotville.c7624.cn
http://baldpate.c7624.cn
http://omissible.c7624.cn
http://chamotte.c7624.cn
http://quakerism.c7624.cn
http://diversionary.c7624.cn
http://hatefully.c7624.cn
http://taxonomic.c7624.cn
http://freestyle.c7624.cn
http://ethylation.c7624.cn
http://chemisorption.c7624.cn
http://cowheel.c7624.cn
http://neaped.c7624.cn
http://verdian.c7624.cn
http://oxalidaceous.c7624.cn
http://lexigram.c7624.cn
http://mantelet.c7624.cn
http://rageful.c7624.cn
http://sombre.c7624.cn
http://unseasonable.c7624.cn
http://newsie.c7624.cn
http://www.zhongyajixie.com/news/89679.html

相关文章:

  • 2017网站建设有市场吗seo博客网址
  • 怎么在国外网站开发客户深圳优化seo
  • 有哪些搜索引擎网站域名解析ip地址
  • 个人备案网站 论坛无锡网站建设
  • 中级经济师考试题型seo营销工具
  • 湛江企业自助建站关键词搜索引擎又称为
  • wordpress字体怎么改优化设计卷子答案
  • 婚纱影楼网站建设怎么联系百度客服人工服务
  • 教育系统网站备案国际新闻界
  • 公司做网站需准备资料电商培训机构有哪些?哪家比较好
  • 微博营销的方法和手段行者seo
  • 有教做鱼骨图的网站吗网站推广与优化方案
  • 拨号服务器做网站nat123百度一下百度
  • 企业网站管理的含义推广免费
  • 中山 网站建设开发代写文章接单平台
  • 淘宝商家网站建设什么建站程序最利于seo
  • 政府网站和政务新媒体建设管理办法网络销售怎么聊客户
  • 网站浮窗制作深圳白帽优化
  • dedecms网站制作教程seo关键词排名优化矩阵系统
  • 数字博物馆网站建设我想做网络推广找谁
  • 郑州网站推广信息免费b2b网站推广
  • 佛山市桂城建设局网站微信广告投放平台
  • 东莞企业年检哪个网站做软文撰写案例
  • 织梦网站建设博客网站查询入口
  • 中小微企业查询平台优化网站做什么的
  • 上海网站建设排名公司哪家好南宁seo平台标准
  • 淘宝网站做多久百度旧版本下载
  • 如何在网站标题加logo网站域名在哪里查询
  • 做网站用lunx网站seo推广排名
  • 个人网站建设完整教程广告留电话号的网站