LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Vlookup in multiple arrays

I am trying to lookup values from a work book that has the same worksheet for
different months. The first column of these worksheets contains an
identifying number. I named the first column of these sheets the month name
and the full lookup array the month with the number 1 on the end. I used the
following array formula to lookup the value in column three of the different
lookup arrays for a cell D2 containing an identifiable number.
{=IF(OR(D2=JANUARY),VLOOKUP(D2, JANUARY1,3, FALSE), IF(OR(D2=FEBRUARY),
VLOOKUP(D2, FEBRUARY1,3,FALSE), IF(OR(D2=MARCH),VLOOKUP(D2, MARCH1,3,FALSE),
"NOT VALID")))}

I would like to have this formula hold true for the entire year, but I can
only nest 7 if statements. I think I need to write a select case custom
function, but I do not know the syntax to compare the function value to the
different months. Here is a code example of what I want to do.

FUNCTION SPECLOOKUP(ID#)
SELECT CASE
CASE ID# IS WITHIN JANUARY
SPECLOOKUP = WORKSHEETFUNCTION.VLOOKUP(ID#,JANUARY1,3,FALSE)
AND SO ON.
END SELECT
END FUNCTION
Can someone tell me how to write the cases correctly?


--
Thanks
R. Patterson
 
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
Reverse Vlookup and Arrays Allen Excel Discussion (Misc queries) 5 February 24th 10 06:54 PM
Arrays/vlookup??? Ian Excel Worksheet Functions 6 February 13th 09 01:24 AM
VLOOKUP 4 MULTIPLE ARRAYS? FARAZ QURESHI Excel Discussion (Misc queries) 3 October 10th 07 08:17 PM
Multiple Arrays, Vlookup Oggie Ben Doggie Excel Worksheet Functions 2 June 26th 06 10:29 PM
Using Vlookup in formula arrays BartDesc Excel Worksheet Functions 4 July 3rd 05 04:42 PM


All times are GMT +1. The time now is 04:20 PM.

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"