I am trying to write an Excel VBA code that allows me to take values from 5 different cells and run it through a formula to produce a single number. I would like it to work as the prebuilt functions in excel work but can't get the inputs right. This is what I have so far.
Public Function compression(Limit, time, timeset, alpha, beta)
Sub compression(Limit, time, timeset, alpha, beta)
'Limiting Compression Strength = LCS
'Time = t
'Alpha =a
'Beta = b
'Setting Time = ts
'Compression Strength = f
Limit = LCS
time = t
timeset = ts
alpha = a
beta = b
x = -((t - ts) / a) ^ b
y = 1 - Exp(x)
f = y * LCS
Range("targetRange") = f
End Sub
End Function
Any help you can give would be greatly appreciated.