#1   Report Post  
Brad
 
Posts: n/a
Default 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?
  #2   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 12:25 AM
I cant use englisch function names in a swedich version of excel PE Excel Discussion (Misc queries) 2 December 7th 04 01:00 AM
Find a Function to use accross different worksheets R. Hale Excel Worksheet Functions 3 November 25th 04 07:07 AM
change function variable prompts?? thinkingfield Excel Worksheet Functions 1 November 8th 04 04:01 PM
Counting Function Dilemma Simon Lloyd Excel Worksheet Functions 0 November 8th 04 03:13 PM


All times are GMT +1. The time now is 06:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"