Hello Guys! I need a very specific formula.

Copper Contributor

So I have a list of product that were sold to different customers.

 

The thing is that they all take different % and what I wanna do is that when I type in a H2 the name of the company(for an example John) it should calculate -5% of E2 and put that number to a cell I2, but if I put in H2 a different company (for an example Benny) it should calculate -10% of E2, but if I put in H2 a third different company (for an example Benny) it should calculate -15% of E2. 

 

Can you please advise if that is possible?

 

Best Regards
Alex

2 Replies

@SunnyKavalov 

You may create separate table with discount percents for customers and use any lookup function (e.g. XLOOKUP ) on it to calculate actual discounts.

@SunnyKavalov 

Create a lookup table:

S0734.png

The formula in I2 is

=-VLOOKUP(H2,$A$2:$B$6,2,FALSE)*E2

This can be filled down.