I have a code that filters data, stores in an array and pastes it to another sheet. How come my array is pasting formulas and leaving me with blank values? The values Im storing in arrays are formulas but I want to paste the values.
It is supposed to store these values:
And paste them but instead pastes four cells of formulas. The formulas are =O10 which are blank and so on.
.Range("$A7:$AJ7").AutoFilter field:=35, Criteria1:="<>", Criteria2:="<>0", Criteria2:="<>-0"
saLastRow = .Range("AI" & .Rows.Count).End(xlUp).Row
Set sFiltered = Worksheets("BusinessDetails").Range("AI8:AI" & saLastRow).SpecialCells(xlCellTypeVisible) 'SA
ReDim Arr(1 To sFiltered.Areas.Count)
I = 0
For Each V In sFiltered.Areas
I = I + 1
Arr(I) = V
'Debug.Print I
Next V
sFiltered.Copy Sheets("Step 4 CM").Range("S10")
Thank you.


Vwill be a range and the range may not always be one cell. Area's are groups of consecutive cells. soArr(I) = Vis actually creating an array of arrays and not a simple 1d array. Also where is the code that deals with theArr? Also copy/paste will paste the formula that it in the sheet copy area. You may want to use PasteSpecial to paste just the values.Arris probably unnecessary. Trying something likesFiltered.Copy Sheets("Step 4 CM").Range("S10").PasteSpecial Paste:=xlPasteValuesbut getting compile error.