I have tested something similar and see no issues.
A =Application.WorksheetFunction.Match(papername, Workbooks("Journaux_2015.xls").Sheets("Feuil1").Columns(1), 0)
B = Application.WorksheetFunction.Match(paperdate, Workbooks("Journaux_2015.xls").Sheets("Feuil1").Rows(r), 0))
Do you get the correct results for both A and B?
you have entered Columns(1), I think you should be using Columns("A:A")
you have entered Rows(r), I think you should be using Columns(r & ":" & r)
You have used several range names do they all exist
You use
Application.WorksheetFunction.Match(papername, Workbooks("Journaux_2015.xls").Sheets("Feuil1").Columns(1), 0)
Does papername exist as a public variable? You may have declared papername as a variable in another macro but you cannot use it in another macro unless it is declared as a public variable.
You use
Application.WorksheetFunction.Index(Workbooks("Journaux_2015.xls").Sheets("Feuil1").sourcerange
Did you declare sourcerange as a named range in this module or in excel.
If in another module it should be declared as a public variable. If in excel you should be using something like this:-
Application.WorksheetFunction.Index(Workbooks("Journaux_2015.xls").Sheets("Feuil1").range("sourcerange")
Bookmarks