View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Sune Fibaek Sune Fibaek is offline
external usenet poster
 
Posts: 38
Default Size of arrayformula with VBA

Bob,

Thank you! That was exactly what I eas trying to do!

/Sune

"Bob Phillips" wrote:

Do you mean

Dim iLastRow As Long
Dim iLastCol As Long
With Worksheets("Ark")
iLastRow = .Cells.Find(What:="*", _
After:=.Range("A1"), _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row

iLastCol = .Cells.Find(What:="*", _
After:=Range("A1"), _
SearchOrder:=xlByColumns, _
SearchDirection:=xlPrevious).Column
End With

Range("A2", Worksheets("Sheet1").Cells(iLastRow, iLastCol)).FormulaArray
= _
"=IF(Ark1!RC:R[" & iLastRow & "]C[" & iLastCol & _
"]="""","""",Ark1!RC:R[" & iLastRow & "]C[" & iLastCol & "])"