Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default Creating a Function

I am trying to write a lookup function that will select a rate from an array
(named NIRATES), based on three crireria. What is the neatest way of writing
the function, other than using nested 'IF' statements within OFFSET/VLOOKUP?

My function needs to look something like;
RATE1 ( €œIN€ or €œOUT€, €œEE€ or €œER€, lookupdate)

Lookupdate is formatted as YEAR only.

The table looks is held as follows:
Year 1992 1993 1994 1995 1996
OUT:EE 7.00% 7.20% 8.20% 8.20% 8.20%
OUT:ER 6.60% 7.40% 7.20% 7.20% 7.20%
IN:EE 9.00% 9.00% 10.00% 10.00% 10.00%
IN:ER 10.40% 10.40% 10.20% 10.20% 10.20%


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Creating a Function

Year 1992 1993 1994 1995 1996 <=== row 1
OUT:EE 7.00% 7.20% 8.20% 8.20% 8.20%
OUT:ER 6.60% 7.40% 7.20% 7.20% 7.20%
IN:EE 9.00% 9.00% 10.00% 10.00% 10.00%
IN:ER 10.40% 10.40% 10.20% 10.20% 10.20%


IN <==== A8
EE <===== A9
1996 < =====A10
10.00% <=====A11

A11 formula is:

=INDEX($A$1:$F$5,MATCH(A8&":"&A9,$A$1:$A$5,0),MATC H(A10,$A$1:$F$1,0))
HTH

"Stu Gnu" wrote:

I am trying to write a lookup function that will select a rate from an array
(named NIRATES), based on three crireria. What is the neatest way of writing
the function, other than using nested 'IF' statements within OFFSET/VLOOKUP?

My function needs to look something like;
RATE1 ( €œIN€ or €œOUT€, €œEE€ or €œER€, lookupdate)

Lookupdate is formatted as YEAR only.

The table looks is held as follows:
Year 1992 1993 1994 1995 1996
OUT:EE 7.00% 7.20% 8.20% 8.20% 8.20%
OUT:ER 6.60% 7.40% 7.20% 7.20% 7.20%
IN:EE 9.00% 9.00% 10.00% 10.00% 10.00%
IN:ER 10.40% 10.40% 10.20% 10.20% 10.20%


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Creating a Function

Use MATCH to find the year (and thus the column), MATCH to find which
row of the 4, and both MATCH functions are contained within an INDEX
function which covers your rates.

Hope this helps.

Pete

On Aug 30, 11:20 am, Stu Gnu wrote:
I am trying to write a lookup function that will select a rate from an array
(named NIRATES), based on three crireria. What is the neatest way of writing
the function, other than using nested 'IF' statements within OFFSET/VLOOKUP?

My function needs to look something like;
RATE1 ( "IN" or "OUT", "EE" or "ER", lookupdate)

Lookupdate is formatted as YEAR only.

The table looks is held as follows:
Year 1992 1993 1994 1995 1996
OUT:EE 7.00% 7.20% 8.20% 8.20% 8.20%
OUT:ER 6.60% 7.40% 7.20% 7.20% 7.20%
IN:EE 9.00% 9.00% 10.00% 10.00% 10.00%
IN:ER 10.40% 10.40% 10.20% 10.20% 10.20%



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
Creating a list using w/ a function Otto Excel Worksheet Functions 2 April 29th 07 04:05 AM
Creating a function BeginnerRick Excel Worksheet Functions 3 November 24th 06 09:12 PM
Need help creating a function nander Excel Discussion (Misc queries) 3 February 20th 06 04:57 AM
creating formula using if function juvena Excel Worksheet Functions 2 October 25th 05 07:55 AM
creating a function NeilPoehlmann Excel Discussion (Misc queries) 5 June 15th 05 08:08 PM


All times are GMT +1. The time now is 02:10 PM.

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

About Us

"It's about Microsoft Excel"