Consulting

Results 1 to 2 of 2

Thread: how to get: Index function keep value?

  1. #1

    how to get: Index function keep value?

    Hi All,

    I use followings code to get a value which match 2 criteria. But after the source file is turn of, it return #Value!

    [VBA]INDEX('D:\CI\ConsumerKPI\07-07\[HCM Jul 07 KPI Tabs.xls]KPIA2021'!$A$1:$BA$3000,MATCH($C9,OFFSET('D:\CI\ConsumerKPI\07-07\[HCM Jul 07 KPI Tabs.xls]KPIA2021'!$A$1,$D9,0,73,1),0)+$D9,MATCH(E$8,'D:\CI\ConsumerKPI\07-07\[HCM Jul 07 KPI Tabs.xls]KPIA2021'!$12:$12,0))[/VBA]

  2. #2
    VBAX Expert
    Joined
    Feb 2005
    Location
    Nanaimo, British Columbia, Cananda
    Posts
    568
    Location
    Hi yurble_vn,

    Trap the error:

    =IF(ISERROR(INDEX( 'D:\CI\ConsumerKPI\07-07\[HCM Jul 07 KPI Tabs.xls]KPIA2021'!$A$1:$BA$3000,MATCH($C9,OFFSET('D:\CI\ConsumerKPI\07-07\[HCM Jul 07 KPI Tabs.xls]KPIA2021'!$A$1,$D9,0,73,1),0)+$D9,MATCH(E$8,'D:\CI\ConsumerKPI\07-07\[HCM Jul 07 KPI Tabs.xls]KPIA2021'!$12:$12,0))),"",INDEX( 'D:\CI\ConsumerKPI\07-07\[HCM Jul 07 KPI Tabs.xls]KPIA2021'!$A$1:$BA$3000,MATCH($C9,OFFSET('D:\CI\ConsumerKPI\07-07\[HCM Jul 07 KPI Tabs.xls]KPIA2021'!$A$1,$D9,0,73,1),0)+$D9,MATCH(E$8,'D:\CI\ConsumerKPI\07-07\[HCM Jul 07 KPI Tabs.xls]KPIA2021'!$12:$12,0)))
    Cheers,

    dr

    "Questions, help and advice for free, small projects by donation. large projects by quote"

    http:\\www.ExcelVBA.joellerabu.com

Posting Permissions

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