怎么向[c1] = Left([a1],Application.Find(",",[a1],1) - 1)传递参数
问题描述:
怎么向[c1] = Left([a1],Application.Find(",",[a1],1) - 1)传递参数
Cells(1,3) = Left(Cells(1,1),Application.Find(",",Cells(1,1),1) - 1)
[c1] = Left([a1],Application.Find(",",[a1],1) - 1)
怎么向上面的两个式子传递参数呢?定义一参数i 怎么写cells(i,2)内我写的格式系统提示有错误!
Cells(1,3) = Left(Cells(1,1),Application.Find(",",Cells(1,1),1) - 1)在VBA内使用时,会提示类型不匹配,[c1] = Left([a1],Application.Find(",",[a1],1) - 现在就是不知道怎么向这个式子传递函数,比如 我定义
dim i as integer
i=20
cells(1,3) = Left([ai],Application.Find(",",[ai],1) - 1)
就不对了 提示类型不对.你知道原因在哪里吗?
答
一、估计是你的i没赋值或为零引起的错误.二、left(ss,0)因为零才出现错误.三、Cells(1,3) = Left(Cells(1,1),Application.Find(",",Cells(1,1),1) - 1)在VBA内使用时,会提示类型不匹配,可能原因是cells(1,1)的单元格...