Alan
I think that you have got confused about the dimensions of your output array. As far as I can see, this should be a two dimensional array with lng_val rows and 4 columns.
In the code below, I put the spreadsheet data into a variant array varData and do the data manipulation on the array as this is much quicker than looping through cells on the spreadsheet.
It took about 3 s on my ancient machine to process 90000 entries.
Sub mdarray2()
Dim val_array() As Variant
Dim lng_val As Long
Dim varData As Variant
Dim lC As Long
Dim lR As Long
Dim lngcounter As Long
'quick and dirty VBA to find the total number of non-zero values
lng_val = Application.WorksheetFunction.CountIf(Range("C3").Resize(Range("C" & Cells.Rows.Count).End(xlUp).Row - 2, 5), "<>0")
ReDim val_array(1 To lng_val, 1 To 4)
'put the spreadsheet data into an array for faster data handling
varData = Range("A1").Resize(Range("A" & Cells.Rows.Count).End(xlUp).Row, 7)
lngcounter = 1
For lR = 1 To UBound(varData, 1)
For lC = 3 To UBound(varData, 2)
If Val(varData(lR, lC)) <> 0 Then
val_array(lngcounter, 1) = varData(lR, 1)
val_array(lngcounter, 2) = varData(lR, 2)
val_array(lngcounter, 3) = varData(2, lC)
val_array(lngcounter, 4) = varData(lR, lC)
lngcounter = lngcounter + 1
End If
Next lC
Next lR
End Sub
Peter