Excel IF formula

Job ID: 37553599

Budget: $10 – $30 AUD

Formula to follow the conditions below.
I guess it'd be a nested IF but whatever works.
Example data and results are shown and in the Excel sheet attached.

If t > 10, W = “Side Bend 10mm”
If OD > 25 x t, W = 4 x t
If OD ≤ 50mm, W = t + 0.1D
If OD > 50mm, W = t + 0.5D
If W is less than 8 then increase to 8
If W is greater than 40, reduce to 40
Round calculation, but not lower limit of 8 and upper limit of 40, UP to whole numbers.

OD t W
11.33 1.73 8
13.7 2.24 8
17.1 2.31 8
21.3 2.77 8
26.7 2.87 8
33.4 3.38 8
42.2 3.56 8
48.3 3.66 9
60.3 3.91 35
73 5.16 40
88.9 5.49 40
101.6 5.74 40
114.3 6.02 40
141.3 6.55 40
168.3 7.11 40
219.1 8.18 33
273.1 9.27 38
323.9 10.31 Side Bend 10mm
355.6 11.13 Side Bend 10mm
406.4 12.7 Side Bend 10mm
457 14.27 Side Bend 10mm
508 15.09 Side Bend 10mm
Related categories: Data Processing Data Entry Excel Statistics Mathematics