+ Reply to Thread
Results 1 to 4 of 4

VBA - Index formula to be combined using IFERROR

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    03-13-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2003
    Posts
    152

    VBA - Index formula to be combined using IFERROR

    Hi Team,

    I have the following VBA code

    Cells(60000, 256).Value = "=INDEX($" & saddr & "$1:$" & laddr & "$" & data_LastRow & "," & j & ", MATCH(" & Position & ",$" & saddr & "$1:$" & laddr & "$1,0)+1)"
    I would like to coupled the below sytax with the above one using IFERROR or something else

    "=INDEX($" & saddr & "$1:$" & laddr & "$" & data_LastRow & "," & j & ", MATCH(" & Position & ",$" & saddr & "$1:$" & laddr & "$1,0))"
    The logic is if first syntax shows error then the second one should excecute (usual IFERROR function).

    I don't know how to coupled these 2 syntax using IFERROR.

    Kindly help me please.

    Thanks

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: VBA - Index formula to be combined using IFERROR

    Hi,

    Untested but perhaps


    Cells(60000, 256).Value = "=IFERROR(INDEX($" & saddr & "$1:$" & laddr & "$" & data_LastRow & "," & j & ", MATCH(" & Position & ",$" & saddr & "$1:$" & laddr & "$1,0)+1),INDEX($" & saddr & "$1:$" & laddr & "$" & data_LastRow & "," & j & ", MATCH(" & Position & ",$" & saddr & "$1:$" & laddr & "$1,0)))""
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: VBA - Index formula to be combined using IFERROR

    try
    Cells(60000, 256).Value = "=IFERROR(INDEX($" & saddr & "$1:$" & laddr & "$" & data_LastRow & "," & j & ",MATCH(" & Position & ",$" & saddr & "$1:$" & laddr & "$1,0)+1),INDEX($" & saddr & "$1:$" & laddr & "$" & data_LastRow & "," & j & ",MATCH(" & Position & ",$" & saddr & "$1:$" & laddr & "$1,0)))"
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  4. #4
    Forum Contributor
    Join Date
    03-13-2013
    Location
    Mumbai
    MS-Off Ver
    Excel 2003
    Posts
    152

    Re: VBA - Index formula to be combined using IFERROR

    Thank you both. It works.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help to simplify an =IF(IFERROR(INDEX(...,MATCH( formula
    By sa12345 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-11-2014, 03:40 AM
  2. Help with Formula Please!! (IFERROR/INDEX)
    By leowyatt in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-29-2013, 04:28 AM
  3. =IFERROR(INDEX - formula not working
    By tcrjmom in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-10-2013, 01:29 PM
  4. [SOLVED] Need help to correct IFERROR AND INDEX Formula
    By ksathwal in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 11-12-2012, 09:57 PM
  5. Looking for better formula of iferror, index and match
    By DavidRoger in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-23-2012, 07:50 AM

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