Consulting

Results 1 to 5 of 5

Thread: Solved: VBA Index/Match Help

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Solved: VBA Index/Match Help

    This is my code, it works fine. The only problem is when I get a #N/A. How can I return a blank instead of #N/A?

    [VBA]Public Sub IndexMatch()
    Dim lastrow
    lastrow = Cells(Rows.Count, 1).End(xlUp).Row
    With Worksheets("Master").Range("c2:c" & lastrow)
    .Formula = "=INDEX(Daily!$A$2:$P$65536,MATCH(A2,Daily!$A$2:$A$65536,),2)"
    .Value = .Value
    End With

    End Sub[/VBA]

    Thank you.
    Last edited by Bob Phillips; 08-25-2011 at 04:00 PM. Reason: Added VBA tags

Posting Permissions

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