数据如上图所示,点击RUN后的运行结果如下: 得到该文件夹,文件夹内容如上图. 代码如下: Private Sub Command_OLIVER() Dim arr arr = Range("A1:C" & [a65536].End(3).Row) Dim i As Long, wName As String, wPath As String wName = "分类汇总" & Format(Now(), "hhmmss") Dim
假设有文件长如下样子: CHROM POS ID REF ALT QUAL FILTER INFO FORMAT samplename 1 3552841 . G . 32.995 . DP=1;MQ0F=0;AF1=0;AC1=0;DP4=1,0,0,0;MQ=40;FQ=-29.9912 GT:PL:DP 0/0:0:1 1 3552842 . T . 32.995 . DP=1;MQ0F=0;AF1=0;AC1=0;DP4=1,0,0,0
问题:提取check之后的数字 来源:Excelhome Sub 提取数字() Dim regexp As New regexp With regexp .Pattern = "check\s*(\d+)" End With With Worksheets("sheet1") r = .Cells(.Rows.Count, 1).End(xlUp).Row arr = .Range("a1:b" & r) For i = 1 To UBo
##指定列求和 需求: 求和:列为“销售金额”的数值 Sub 求和()Dim i As Integer, j As IntegerFor i = 3 To 56For j = 15 To 81 Step 2Cells(i, 13) = Cells(i, 13) + Cells(i, j)Next jNext i End Sub 中间有一段无法调试的代码, Sub 求和()Dim i As Integer, j As IntegerFor i = 3 To range("a65536")
原文:VBA读取word中的内容到Excel中 Public Sub Duqu() Dim myFile As String Dim docApp As Word.Application Dim docRange As Word.Range myFile = ThisWorkbook.Path & "\Word文档的名字" '指定Word文档 Set docApp = New Word.Application docApp
1,把表中某一列的内容合并为一行 select province,CONCAT('[\"全部\",\"',GROUP_CONCAT(city ORDER BY cityID separator '\"\,\"'),'\"]') as group1 from hat_city a LEFT JOIN hat_province b on a.father=b. provinceID GROUP BY father ORDER BY cityID:根据