Hello
I would really like to understand what determines the use of these two bits of code.
This works fine:
[TABLE="width: 1190"]
<colgroup><col></colgroup><tbody>[TR]
[TD] wbTSS.Sheets("Sheet1").Range("D2:D" & LastRow).FormulaR1C1 = _[/TD]
[/TR]
[TR]
[TD] "=IF(RC[1]="""","""",VLOOKUP(RC[1],'[Dundee Assay building.xlsx]Kinase grouping'!C2:C6,5,FALSE))"
but when I used:
[TABLE="width: 493"]
<tbody>[TR]
[TD="width: 493"] wbTSS.Sheets("Sheet1").Range(Cells(2, 4), Cells(LastRow, 4)).FormulaR1C1 = _[/TD]
[/TR]
</tbody>[/TABLE]
I get a Run-Time error '1004':
Application-define or object-defined error.
Are there rules for when to use Cells(x,x)?
Many thanks
Hankj
[/TD]
[/TR]
</tbody>[/TABLE]
I would really like to understand what determines the use of these two bits of code.
This works fine:
[TABLE="width: 1190"]
<colgroup><col></colgroup><tbody>[TR]
[TD] wbTSS.Sheets("Sheet1").Range("D2:D" & LastRow).FormulaR1C1 = _[/TD]
[/TR]
[TR]
[TD] "=IF(RC[1]="""","""",VLOOKUP(RC[1],'[Dundee Assay building.xlsx]Kinase grouping'!C2:C6,5,FALSE))"
but when I used:
[TABLE="width: 493"]
<tbody>[TR]
[TD="width: 493"] wbTSS.Sheets("Sheet1").Range(Cells(2, 4), Cells(LastRow, 4)).FormulaR1C1 = _[/TD]
[/TR]
</tbody>[/TABLE]
I get a Run-Time error '1004':
Application-define or object-defined error.
Are there rules for when to use Cells(x,x)?
Many thanks
Hankj
[/TD]
[/TR]
</tbody>[/TABLE]