A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
One way:
If you've only got the one set of prices, this will work fine:
=IF(B1<>"", LOOKUP(B1, {"Large","Medium","Small"}, {20,15,10}) * D1 + C1, "")
OTOH, if you've got a large number of products, I'd use a table, say:
J K L M
1 Product Small Medium Large
2 Product A 10 15 20
3 Product B 12 18 24
4 Product C 8 12 16
You could then do something like:
=IF(B1<>"", VLOOKUP(A1, J:M, LOOKUP(B1, {"Large","Medium","Small"}, {4,3,2}), FALSE) * D1 + C1, "")
and copy down for the remaining products. Note that the table could be on a separate sheet (and hidden if desired).
If your table headers in row 1 are the same as your choices (as shown above), then you can make this more efficient by naming the table (say, "Table" - select the range, or entire columns, and enter the name in the Name box at the left side of the Formula bar) and using something like:
=IF(B1<>"", VLOOKUP(A1, Table, MATCH(B1, OFFSET(Table,,,1,), FALSE)) * D1 + C1, "")