Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- REM ***** BASIC *****
- public Function calcprice(rCell) as single
- Dim vArray() As Variant
- Dim n As Long
- Dim price as single
- Dim searchrange As Range
- Dim resultrange As Range
- Set searchrange = Sheets("channels").Range("a2:a89")
- Set resultrange = Sheets("channels").Range("f2:f89")
- vArray() = Split(rCell, ",")
- price = 0
- for n=0 to uBound(vArray())
- price = price + Application.LOOKUP(vArray(n),searchrange,resultrange)
- next n
- calcprice = price
- End function
Add Comment
Please, Sign In to add comment