+ Reply to Thread
Results 1 to 2 of 2

Vlookup array problem

Hybrid View

  1. #1
    Lolly
    Guest

    Vlookup array problem

    Hi
    All

    My formula is like this:
    Sub Create()
    Range("C3:N3").Value = Application.WorksheetFunction.Vlookup(Range("A3"),
    Range("450:600"), {7,10,13,16,19,22,25,28,31,34,37,40}, FALSE)
    End Sub

    Error which I get Is Unable to get worksheet vlookup property value...

    I want to display values in cell from c3:N3 after it performs vlookup.

    I have hundreds of rows.

    Any help in highly appreciated.

    Thanx in advance
    --
    Kittie

  2. #2
    Tom Ogilvy
    Guest

    Re: Vlookup array problem

    VBA doesn't support array formulas which is what you are trying to do.
    Sub Create()
    varr = Evaluate("{7,10,13,16,19,22,25,28,31,34,37,40}")
    i = lbound(varr)
    for each cell in Range("C3:N3")
    cell.Value = Application.WorksheetFunction.Vlookup(Range("A3"), _
    Range("450:600"), varr(i), FALSE)
    i = i + 1
    Next
    End Sub

    --
    Regards,
    Tom Ogilvy


    "Lolly" <Lolly@discussions.microsoft.com> wrote in message
    news:8A43E936-9C47-484A-81ED-6C0819CD4E0C@microsoft.com...
    > Hi
    > All
    >
    > My formula is like this:
    > Sub Create()
    > Range("C3:N3").Value = Application.WorksheetFunction.Vlookup(Range("A3"),
    > Range("450:600"), {7,10,13,16,19,22,25,28,31,34,37,40}, FALSE)
    > End Sub
    >
    > Error which I get Is Unable to get worksheet vlookup property value...
    >
    > I want to display values in cell from c3:N3 after it performs vlookup.
    >
    > I have hundreds of rows.
    >
    > Any help in highly appreciated.
    >
    > Thanx in advance
    > --
    > Kittie




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1