Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel 在其他工作表中显示结果_Excel_Vba - Fatal编程技术网

Excel 在其他工作表中显示结果

Excel 在其他工作表中显示结果,excel,vba,Excel,Vba,我在将此代码的结果显示到表2时遇到问题。是否有方法将此代码转换为显示在特定工作表中?比如说第二张 单元格偏移量(,.Columns.Count+1)=行偏移量 以下是完整的代码: 选项显式 副标题() 变暗单元格作为范围,f作为范围 将行偏移设置为等长 带有工作表(“间隙”)。范围(“A2:F2000”) 对于.SpecialCells中的每个单元格(xlCellTypeConstants、XLNumber) rowOffset=1 Set f=.Find(what:=单元格,after:=单元

我在将此代码的结果显示到表2时遇到问题。是否有方法将此代码转换为显示在特定工作表中?比如说第二张

单元格偏移量(,.Columns.Count+1)=行偏移量

以下是完整的代码:
选项显式
副标题()
变暗单元格作为范围,f作为范围
将行偏移设置为等长
带有工作表(“间隙”)。范围(“A2:F2000”)
对于.SpecialCells中的每个单元格(xlCellTypeConstants、XLNumber)
rowOffset=1
Set f=.Find(what:=单元格,after:=单元格,LookIn:=xlValues,lookat:=xlother,searchdirection:=xlPrevious)
如果不是的话,f是零,f.Row可能

Worksheets("Sheet2").Cells(cell.Row, cell.Column + .Columns.Count + 1).Value = rowOffset