A user defined function can help here
Function Special(Cell1 As Range, Cell2 As Range)
Do
TotalOfCell2Row = 0
N = N + 1
For M = 1 To N
TotalOfCell2Row = TotalOfCell2Row + Cell2.Offset(0, 1 - M)
Next M
Special = Cell1 / TotalOfCell2Row
If Special < 1 Then
Special = Special * 30
Exit Function
End If
Loop
End Function
To use this, set the value of Cell1 = F3 and Cell2 = E2
--
mrice
Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile:
http://www.excelforum.com/member.php...o&userid=10931
View this thread:
http://www.excelforum.com/showthread...hreadid=539312