View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
J David Southwick J David Southwick is offline
external usenet poster
 
Posts: 2
Default Extracting info from a database

in article , Roger Whitehead at
wrote on 29/12/2003 10:57 AM:

Hi David, try this (Untested):

Private Sub extract()

Dim descript(7) as String
Dim I As Double
I = 1013

descript(0) = WorksheetFunction.VLookup(I, Range("itemlist!Database"), 2)
Debug.Print descript

descript(1) = WorksheetFunction.VLookup(I, Range("itemlist!Database"), 3)
Debug.Print descript

descript(2) = WorksheetFunction.VLookup(I, Range("itemlist!Database"), 4)
Debug.Print descript
'......etc

'to descript(7)
End Sub



Alternatively type "Option Base 1" in the decalrations section of the
module; the Array elements will then be (1) to (8)

Thanks for your ideas Roger and Raj
Dave