![]() |
if then function
I would like to create a formula to multiply the data in A1 by a percentage
based on the percentage in B1. So, if B1<80% then A1x10%, if B1 is 80% to 89% then A1x15%, if B1is 90% to 99% then A1x18% and if B1100% then A1x20%. Does anybody have a lot of experience with the if then function? |
On Thu, 30 Dec 2004 05:17:03 -0800, "Brad"
wrote: I would like to create a formula to multiply the data in A1 by a percentage based on the percentage in B1. So, if B1<80% then A1x10%, if B1 is 80% to 89% then A1x15%, if B1is 90% to 99% then A1x18% and if B1100% then A1x20%. Does anybody have a lot of experience with the if then function? I would use VLOOKUP for more flexibility than doing nested IF's. For example, set up a table named 'tbl': 0 10% 80% 15% 90% 18% 100% 20% Then use the formula: =VLOOKUP(B1,tbl,2) to compute the percentage. So in your example, =A1*VLOOKUP(B1,tbl,2) Note that the table output makes some assumptions about the undefined values in your example. You do not define what you want if B1 is between 89% and 90%; nor do you define what you want if B1 is greater than 99% up to and including 100%. Ensure that the assumptions made are what you want. --ron |
All times are GMT +1. The time now is 06:06 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com