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: 17
Default Lookup Return Multiple Values in VBA

My problem requires returning multiple values through a lookup function in
VBA. My code is as follows:

Do
Pick = Application.WorksheetFunction.Small(Range_1, i)
A = Application.WorksheetFunction.Hlookup(Pick,Range_2 , x, False)
A1 = A1 + A
i = i +1
Loop Until i = Z

An alternative that comes to my mind is to get the address of the cell that
contains the smallest i value in the array Range_1 and then use offset to get
correspodning values from Range_2. However, I cant get the address of that
cell.

A close approach is as follows but it distrurbs the over all logic of my
model:

Do
If Worksheets(2).Range("F71").Offset(0, Count).Value = Pick Then
Addr = (Worksheets(2).Range("F71").Offset(0, Count).Address)
A = Worksheets(2).Range(Addr).Offset(5, 0).Value
A1= A1=A
Count = Count +1
Loop

Can any one help me with

1. To obtain the address of the cell with smallest i vale in Range_1 and
repeating the process.

Or

2. Lookup Returning multiple values in VBA

Or anyother suitable approach which solves my problem.

Many Thanks

Mallick

 
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
Lookup to return multiple values lesg46 Excel Worksheet Functions 12 October 9th 08 11:47 PM
LOOKUP TO RETURN MULTIPLE VALUES wilma2299 Excel Discussion (Misc queries) 1 August 18th 07 01:38 PM
Lookup and Return Multiple Values billinr Excel Worksheet Functions 3 April 27th 07 06:59 PM
lookup and return multiple values Treena Excel Worksheet Functions 1 April 10th 07 10:26 PM
how to lookup a value and return multiple corresponding values Asthee Excel Worksheet Functions 1 November 5th 05 01:49 PM


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