作者:乔山办公网日期:
返回目录:excel表格制作
Dim i%, a%
a = Sheets("source data from 201010 to (2)").Range("h1").CurrentRegion.Rows.Count
For i = 2 To a
If Cells(i, 6).Value = "NB" Then
Cells(i, 1) = Cells(i, 6).Value
Cells(i, 2) = Cells(i, 7).Value
Cells(i, 3) = Cells(i, 8).Value
END IF
Next i
没有百加度END IF朋友版!权
2007以上版本直接在H2单元格输入以知下公式,道然后向右向下填充公式
=IFERROR(VLOOKUP($G2,$B:$D,COLUMN(B1),0),0)
2003以下版本直回接在H2单元格输入以下公式答,然后向右向下填充公式
=IF(ISERROR(VLOOKUP($G2,$B:$D,COLUMN(B1),0)),VLOOKUP($G2,$B:$D,COLUMN(B1),0),0)
没看懂你抄的行列关系袭,我猜知是不是这样道
sub test()
for i=35 to 52
if range("A"&i)="new" o rrange("A"&i)="obs" or range("A"&i)="dal" then
range("l"&i).locked=true
range("k"&i).locked=true
elseif
range("A"&i)="add" o rrange("A"&i)="exp" or range("A"&i)="rev" then
range("c"&i).locked=true
range("h"&i).locked=true
end if
next
end sub
干嘛还用IF,直接用
=固定值+RAND()
不就可以了?固定值可以输入数字,或者引用某个单元格