Consulting

Results 1 to 3 of 3

Thread: array formula that will index a horizontal array

  1. #1
    VBAX Mentor
    Joined
    May 2010
    Location
    London
    Posts
    307
    Location

    array formula that will index a horizontal array

    Hi Everyone ,

    I need to index an array like C3:P38 obviously below formula is not right way to do it. Is there a formula to do this or I have to re organise data in worksheet Exc ? I attached a sample workbook to clarify what I am trying to achieve. Please see column x in sp

    =IF(ISNA(INDEX(Exc!$C$3:$P$38,MATCH(1,((Exc!$A$3:$A$38=$B$2)*(Exc!$C$2:$P$2 =$B9)*(Exc!$B$3:$B$38="FIXD")),0))),"",INDEX(Exc!$C$3:$P$38,MATCH(1,((Exc!$ A$3:$A$38=$B$2)*(Exc!$C$2:$P$2=$B9)*(Exc!$B$3:$B$38="FIXD")),0)))

    Cheers
    Yeliz
    Attached Files Attached Files
    Sub Learning VBA()

    Do
    Practice Most Useful VBA Examples
    Loop Until Become an Expert in VBA

    End Sub

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    I'll leave you to add the if(isna(.. bit, but in cell X8 of sheet sp, try this:
    =INDEX(OFFSET(Exc!$A$3:$A$38,0,MATCH($B8,Exc!$B$2:$P$2,0)),MATCH(1,((Exc!$A $3:$A$38=$B$2)*(Exc!$B$3:$B$38="FIXD")),0))
    or shorter:
    =INDEX(Exc!$C$3:$P$38,MATCH(1,(Exc!$A$3:$A$38=$B$2)*(Exc!$B$3:$B$38="FIXD") ,0),MATCH($B8,Exc!$C$2:$P$2,0))
    both array-entered.
    Copy down.
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #3
    VBAX Mentor
    Joined
    May 2010
    Location
    London
    Posts
    307
    Location
    Thanks very much p45calIt works perfectmuch appreciated..
    Cheers


    Quote Originally Posted by p45cal View Post
    I'll leave you to add the if(isna(.. bit, but in cell X8 of sheet sp, try this:
    =INDEX(OFFSET(Exc!$A$3:$A$38,0,MATCH($B8,Exc!$B$2:$P$2,0)),MATCH(1,((Exc!$A $3:$A$38=$B$2)*(Exc!$B$3:$B$38="FIXD")),0))
    or shorter:
    =INDEX(Exc!$C$3:$P$38,MATCH(1,(Exc!$A$3:$A$38=$B$2)*(Exc!$B$3:$B$38="FIXD") ,0),MATCH($B8,Exc!$C$2:$P$2,0))
    both array-entered.
    Copy down.
    Sub Learning VBA()

    Do
    Practice Most Useful VBA Examples
    Loop Until Become an Expert in VBA

    End Sub

Posting Permissions

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