twoodsmall79
New Member
- Joined
- Jul 18, 2014
- Messages
- 18
I am looking for a way to create a formula that is to be housed in a cell but will vary length depending on the number of components. Basically I have a Display sku followed by x number of components. I am looking for a formula similar to "= (CompUnits1*Price1)+(CompUnits2*Price2)..."
I have tried creating a string but am running into troubles. This is in the middle of some other code but basically here is what I have. Any help is appreciated.
I have tried creating a string but am running into troubles. This is in the middle of some other code but basically here is what I have. Any help is appreciated.
Code:
Dim Formula as String
Dim DispComp, MyDisp as Range
Formula = BasePrice
For Each DispComp In MyDisp.Offset(1, -1).Resize(l)
Formula = Formula & "+ (" & DispComp.Offset(0,6) & "*" & DispComp.(Offset(0,12) & ")"
Next DispComp