Excel Array formula to lookup for values and create a data Validat :: MrExcel Message Board



 FAQFAQ
   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   FavoritesFavorites   StatisticsStatistics 
 RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Online StoreOnline Store

MrExcel Message Board Forum Index -> Excel Questions

Array formula to lookup for values and create a data Validat
Post new topic   Reply to topic
Last Thread | Next Thread  >   Printable version
  Author    Thread

lovallee
Board Regular


Joined: 09 Jul 2002
Posts: 65
Location: Canada

Status: Offline

 Reply with quote  

Hello:

I am trying to use and array formula to extract certain values from a database and return a list of extracted value which will be use later for data Validation list (tools / Validation / list). Here is an example of what I tried so far:


Microsoft Excel - Classeur1.xls___Running: xl2000 : OS = Windows Windows 2000
(F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)bout
=

A
B
C
D
1
The Data:   
2
Database   
3
Field1
(Scanned values)
Field2 - option 1
(value to be returned to the Validation list)
Field2 - option 2
(value to be returned to the Validation list)
 
4
Hello                1 013     S345s  
5
Bye                   204     10-10-34-409  
6
Goodbye                4 056     a1D45  
7
Hello                   234     g56jJ  
8
Good morning                5 600     d459s  
9
Hello                4 555     1jsj8-js2  
10
    
11
Lookup value (range create only for array formula purpose   
12
Hello   
13
Hello   
14
Hello   
15
Hello   
16
Hello   
17
Hello   
18
    
19
Progress to date:   
20
Range of arrays formula that creates the Validation list   
21
FormulaValue returned by the formula  
22
{=LARGE(IF(EXACT(B$5:$B$10;$D$5:$D$10);OFFSET($D$5:$D$10;0;1;icon_wink.gificon_wink.gif;1)}4555  
23
{=LARGE(IF(EXACT(B$5:$B$10;$D$5:$D$10);OFFSET($D$5:$D$10;0;1;icon_wink.gificon_wink.gif;2)}1013  
24
{=LARGE(IF(EXACT(B$5:$B$10;$D$5:$D$10);OFFSET($D$5:$D$10;0;1;icon_wink.gificon_wink.gif;3)}234  
25
{=LARGE(IF(EXACT(B$5:$B$10;$D$5:$D$10);OFFSET($D$5:$D$10;0;1;icon_wink.gificon_wink.gif;4)}0  
26
..  
27
{=LARGE(IF(EXACT(B$5:$B$10;$D$5:$D$10);OFFSET($D$5:$D$10;0;1;icon_wink.gificon_wink.gif;n)}0  
28
    
Feuil1 

[HtmlMaker 2.20] To see the formula in the cells just click on the cells hyperlink or click the Name box
PLEASE DO NOT QUOTE THIS TABLE IMAGE ON SAME PAGE! OTHEWISE, ERROR OF JavaScript OCCUR.


Problems:
1 - The above template only works with numeric data to be returned (field2)
2 - I need to copy the "Lookup value" in a range of the same size than the "Scanned values" range

Needed:
1 - I need to return text value to the data Validation list (as in Field2 - option 2).
2 - I would prefer not to have to create a range for the Lookup value.
The Lookup value need to be in one cell only in order to simplify the template.
3 - How can I do that???

Thank you !

Louis

Post Wed Aug 14, 2002 12:00 pm 
 View user's profile Send private message

lovallee
Board Regular


Joined: 09 Jul 2002
Posts: 65
Location: Canada

Status: Offline

 Reply with quote  

Forget about the present message,

Its my first try with Colo's add-in

Louis

Post Wed Aug 14, 2002 12:16 pm 
 View user's profile Send private message
  Display posts from previous:      

MrExcel Message Board Forum Index -> Excel Questions


Forum Jump:
Jump to:  

Post new topic   Reply to topic
Page 1 of 1



Add To Favorites

 


Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB: 2.0.4 © 2001 phpBB Group

Need help posting your first question? Read how to post

Need extra help ? Couldn't get the answer you needed ? Get a free quote from our Consulting Team

Download Colo's HTML Maker utility for displaying your Excel Worksheet on the board.

Download VB HTML Maker to post your code on the board


Check out our new index to 485 Excel Articles.


Return to MrExcel Consulting

All contents Copyright 1998-2004 by MrExcel.com
If you believe information posted here is from your copyrighted source, notify us per the Terms of Use
Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.