Thinking about this, I don't see how this can be accomplished with just a formula; especially if this data range will grow larger. Best achieved, in my opinion, through VBA. Also this poses a problem:

I think for now it doesn't matter where they appear, but as the spreadsheet start getting bigger my mentor will move the cumulative result to appear on the first row moving all the data a row down.

In my head, it's impossible to have answers laid out like that. If you are supposed to be calculating the result for multiple vendors that appear on each individual row, then you cannot have the results on just one row above all the data. Results will have to be in a column to the right of all the data.

I also cannot stress enough how wrong the math is here lol.

I mean, if all 4 of these vendors have a quantity, your going to end up with whack results.

EG: you have 4 quantities: 1, 4, 7, 8 then your result will be 224. I would urge you to double check with your mentor; maybe he's had a brain fart and meant to say add.

Either way, this is as much as I was able to come up with. I cannot figure out a way to collect the values, then multiply them all together. Maybe someone else can figure this out.

Rich (BB code):

```
Sub quantityCalcs()
Dim ws As Worksheet
Dim lastRow As Integer, i As Integer, x As Integer, rowResult As Integer
Dim rRange As Range, rCell As Range
Dim qtyColl As Collection
Set ws = ThisWorkbook.Sheets("Sheet1")
With ws
lastRow = .Cells(.Rows.Count, 1).End(xlUp).Row
For i = 2 To lastRow
Set qtyColl = New Collection
Set rRange = .Range("A" & i & ":H" & i)
For Each rCell In rRange.Cells
If IsNumeric(rCell.Value) And rCell.Value > 0 Then
qtyColl.Add rCell.Value
End If
Next rCell
```**For x = 1 To qtyColl.Count
rowResult = x * x
Next x**
.Range("I" & i).Value = rowResult
rowResult = 0
Set qtyColl = Nothing
Next i
End With
End Sub

**Edit:** Above runs through each row, but math is not correct. Refer to code highlighted in red. Having trouble figuring that out.

Good luck.