Excel Formula ... Very hard to find the solution

vijaychennai

Board Regular
Joined
Dec 7, 2009
Messages
239
Hello all,

I want to get points based on below table.

Excel Workbook
BCDEFGHIJKL
1ABCD
2100%160100%80100%53.33100%44.44
3120%192120%96120%64120%53.33
4
5Less than 25 %0Lessthan 50 %0Less than 75%070% to 89.99%0
60 to 69.99%-5
Sheet1



I want to get points for the below.

Excel Workbook
ABC
1ClientPercentagePoints
2A40%
3A24%
4A125%
5B80%
6B49%
7B121%
8C76%
9C74%
10C140%
11D75%
12D62%
13D140%
Sheet2



Condition:

Group A:

Lessthan 25% points "0" and greater than 120% Points "192"

Group B :

Lessthan 50% points "0" and greater than 120% Points "96"


Group C :

Lessthan 75% points "0" and greater than 120% Points "64"


Group D :

Lessthan 70% points "-5"
greater than 120% Points "53.33"
70 to 89.99 % points "0"

Points calculate based on prorate.

Example :

Group A:
100 % = 160 means then 90 % = 90%*160/100%

Answer :

Excel Workbook
ABC
1ClientPercentagePoints
2A40%64
3A24%0
4A125%192
5B80%64
6B49%0
7B121%96
8C76%40.5308
9C74%0
10C140%64
11D75%0
12D62%-5
13D140%53.33
Sheet2
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
you could create a database (manually or with vba) to set up a lookup table with 100%, points, and lower limit (below which column C would have 0). This table would look like this:
Client Min% 100%
A 25% 160
B 50% 80
C 75% 53.33
D 70% 44.44

Then, to acommodate the negative points, you could add in a second condition based on a separate database.

Or you could write a piece of code that has all of this logic programmed in vba.
 
Upvote 0
assuming you set up the columns as described earlier in A-C, and column E contains the client and column F contains the percent, the formula for column G would be:

{=SUM(IF($A$1:$A$4=E4,1,0)*IF($B$1:$B$4<=F4,1,0)*$C$1:$C$4)*F4}

this is an array, so you'd have to hold shift+ctrl+Enter for it to work...
 
Upvote 0
Copy the below formula into C2 and copy down - seems to work...:)


=IF(AND(A2="A",B2>0.25,B2<1.199),SUM((160/100)*B2*100),IF(AND(A2="A",B2<0.25),0,IF(AND(A2="A",B2>1.2),192,IF(AND(A2="B",B2>0.5,B2<1.199),SUM((80/100)*B2*100),IF(AND(A2="B",B2<0.5),0,IF(AND(A2="B",B2>1.2),96,IF(AND(A2="C",B2>0.75,B2<1.199),SUM((53.33/100)*B2*100),IF(AND(A2="C",B2<0.75),0,IF(AND(A2="C",B2>1.2),64,IF(AND(A2="D",B2>0.9,B2<1.199),SUM((44.44/100)*B2*100),IF(AND(A2="D",B2<0.7),"-5",IF(AND(A2="D",B2>0.7,B2<0.8999),0,IF(AND(A2="D",B2>1.2),53.33,0)))))))))))))

There may be a quicker way of doing this with VB but have just tried to use this with the data given and it returns the required answers
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,337
Members
452,907
Latest member
Roland Deschain

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top