Another thing that would greatly help other people help you would be to
1. use meaningful and self-documenting variable names (what is 'taa' and 'mrr' and 'rg'?) 'tempsum' I can guess at
2. Use explicit Types (Dim mrr As Variant, Dim rg as Range, etc.)
3. Use indenting and blank lines to 'block out' the lines that make up a logical piece of functionality
Option Explicit
Sub taa()
Dim mrr
Dim i As Integer, j As Integer
Dim rg As Object
Dim tempsum
With Worksheets("Sheet1")
Range("f:f").ClearContents
Set rg = Range("a1:f" & Cells(Rows.Count, "A").End(xlUp).Row)
mrr = rg
For i = 3 To UBound(mrr)
tempsum = 0
For j = 1 To UBound(mrr, 2)
If mrr(i, j) > mrr(1, j) Then
mrr(i, UBound(mrr, 2)) = mrr(i, UBound(mrr, 2)) + mrr(i, j) * mrr(1, j)
Else
mrr(i, UBound(mrr, 2)) = mrr(i, UBound(mrr, 2)) + mrr(i, j) * mrr(1, j) * 2
End If
Next j
tempsum = tempsum + mrr(i, UBound(mrr, 2))
Next I
rg = mrr
Set rg = Nothing
End With
Dim mrg As Object
Dim brr As Variant
With Worksheets("Sheet1")
Set mrg = Range("f1:g" & Cells(Rows.Count, "f").End(xlUp).Row + 1)
brr = mrg
For i = 3 To UBound(brr) - 1
brr(UBound(brr), 1) = brr(UBound(brr), 1) + brr(i, 1)
Next I
mrg = brr
Set mrg = Nothing
End With
Dim nrg As Object
Dim crr As Variant
With Worksheets("Sheet1")
Set nrg = Range("f1:g" & Cells(Rows.Count, "f").End(xlUp).Row)
crr = nrg
For i = 3 To UBound(crr)
crr(i, 2) = crr(i, 1) / crr(UBound(crr), 1)
Next I
nrg = crr
Set nrg = Nothing
End With
End Sub