Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default formulas - hard to explain

Hi
I need to write a formula which would refer to a table with a calculation
depending on what I entered in the first cell. It is a table which will
minus a percentage depending on what the margin class number ( 22 - 4)
e.g.
A1 B1 C1 A1 B1 C1
£24.99 - 19 (75%) = £6.247 or £24.99 - 14 (52%) = £11.995

I created the table to do the equation however I need an 'IF' formula which
states, 'if B1 contains '16' refer to cell E4' which has the formula in or
'if B1 contains '19' refer to cell E7' hence subtracting the percentage to
give me the result in cell C1

Any help or guidance would be greatly appreciated.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default formulas - hard to explain

In G1:G10 I have some number 0, 5, 10, 15, ....
In H1:H10 I have the discount percentages
In A1 I have a dollar (pound) amount say (£24)
In B1 I enter a number (say, 19)
In C1 I have the formula
=ROUND(A1*(1-VLOOKUP(B1,$G$1:$H$10,2)),2)
The VLOOKUP part locates the 19 of B1 (actually it locates 15 since this is
be number closest but smaller than 19) and returns the corresponding
percentage.
Experiment with just =VLOOKUP(B1,$G$1:$H$10,2) to see how it works
The we compute the new dollar amount A1*(1-discount)
The ROUND will ensure you see pounds and pence (2 decimal places)

This is so much easier that a horrid nested IF statement.
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"LPRH" wrote in message
...
Hi
I need to write a formula which would refer to a table with a calculation
depending on what I entered in the first cell. It is a table which will
minus a percentage depending on what the margin class number ( 22 - 4)
e.g.
A1 B1 C1 A1 B1 C1
£24.99 - 19 (75%) = £6.247 or £24.99 - 14 (52%) = £11.995

I created the table to do the equation however I need an 'IF' formula
which
states, 'if B1 contains '16' refer to cell E4' which has the formula in or
'if B1 contains '19' refer to cell E7' hence subtracting the percentage to
give me the result in cell C1

Any help or guidance would be greatly appreciated.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default formulas - hard to explain

On Nov 11, 4:48 am, LPRH wrote:
I need to write a formula which would refer to a table with a calculation
depending on what I entered in the first cell. It is a table which will
minus a percentage depending on what the margin class number ( 22 - 4)
e.g.
A1 B1 C1 A1 B1 C1
£24.99 - 19 (75%) = £6.247 or £24.99 - 14 (52%) = £11.995

I created the table to do the equation however I need an 'IF' formula which
states, 'if B1 contains '16' refer to cell E4' which has the formula in or
'if B1 contains '19' refer to cell E7' hence subtracting the percentage to
give me the result in cell C1.


And if B1 is 13, then E1; if 15, E3; if 18, then E8; etc? In other
words, do you have a table of percentages in column E for each class
number?

If so, the following indexes that table based on the value in B1. I
assume that the table begins with E1 corresponding to class number 13;
and I assume that column E contains an entry for all class numbers.
Then in C1:

=A1*(1-offset(E1,B1-13,0))

You can bulletproof this by doing the following, assuming that 22 is
the largest class number:

=A1*(1-offset(E1,max(0,min(22,B1)-13),0))

Note: This assumes that you record the percentages in column E in the
form of 75% or 0.75, not simply 75.

HTH


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
umm..hard to explain.. Mo2 Excel Worksheet Functions 1 June 18th 07 06:41 AM
Let me see if I can explain this... jsc3489 Excel Worksheet Functions 0 July 22nd 05 05:04 PM
Can someone please explain array formulas to me? KMHarpe Excel Discussion (Misc queries) 2 July 20th 05 08:35 PM
Explain these please Sal Excel Worksheet Functions 1 March 24th 05 08:43 PM
References to open/hidden workbooks become hard-coded in formulas - 2003 L Mehl Excel Discussion (Misc queries) 2 November 27th 04 09:28 PM


All times are GMT +1. The time now is 12:01 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"