# discount codes

• Hi, I did this exercise years ago and for some reason cannot remember how I did it.

I have a list of about 10000 parts. Each part has a letter assigned to it in column B. Column C has a price. I need to calculate a new price by using a multiplier stored in another table. The multiplier to use is determined by the letter in column B.

This is a very basic example of what I'm dealing with. I'm looking at 10000 parts and about 50 different multipliers. Codes are generally three characters.
[TABLE="width: 384"]

[tr]

[td]

Part

[/td]

[td]

Code

[/td]

[td]

Price

[/td]

[td][/td]

[TD="colspan: 2"]Multiplier
[/TD]

[/tr]

[tr]

[TD="align: right"]12345
[/TD]

[td]

A

[/td]

[TD="align: right"]2.00
[/TD]

[td][/td]

[td]

A

[/td]

[TD="align: right"]0.1
[/TD]

[/tr]

[tr]

[TD="align: right"]12346
[/TD]

[td]

B

[/td]

[TD="align: right"]2.00
[/TD]

[td][/td]

[td]

B

[/td]

[TD="align: right"]0.2
[/TD]

[/tr]

[tr]

[TD="align: right"]12347
[/TD]

[td]

C

[/td]

[TD="align: right"]2.00
[/TD]

[td][/td]

[td]

C

[/td]

[TD="align: right"]0.3
[/TD]

[/tr]

[tr]

[TD="align: right"]12348
[/TD]

[td]

B

[/td]

[TD="align: right"]2.00
[/TD]

[td][/td]

[td]

D

[/td]

[TD="align: right"]0.4
[/TD]

[/tr]

[tr]

[TD="align: right"]12349
[/TD]

[td]

B

[/td]

[TD="align: right"]2.00
[/TD]

[td][/td]

[td]

G

[/td]

[TD="align: right"]0.5
[/TD]

[/tr]

[tr]

[TD="align: right"]12350
[/TD]

[td]

A

[/td]

[TD="align: right"]2.00
[/TD]

[td][/td]

[td]

Z

[/td]

[TD="align: right"]0.6
[/TD]

[/tr]

[tr]

[TD="align: right"]12351
[/TD]

[td]

D

[/td]

[TD="align: right"]2.00
[/TD]

[td][/td]

[td][/td]

[td][/td]

[/tr]

[tr]

[TD="align: right"]12352
[/TD]

[td]

Z

[/td]

[TD="align: right"]2.00
[/TD]

[td][/td]

[td][/td]

[td][/td]

[/tr]

[tr]

[TD="align: right"]12353
[/TD]

[td]

G

[/td]

[TD="align: right"]2.00
[/TD]

[td][/td]

[td][/td]

[td][/td]

[/tr]

[tr]

[TD="align: right"]Thank you!
[/TD]

[td][/td]

[TD="align: right"][/TD]

[td][/td]

[td][/td]

[td][/td]

[/tr]

[/TABLE]

• Re: discount codes

A simple VLOOKUP - The Multiplier columns were moved over to Col E/F to make room for the new price

=C3+(C3*VLOOKUP(B3, \$E\$2:\$F\$7, 2,FALSE))