How to combine connect two different for each activity

We’re trying to create a project that reads a path, get a part of file names and check it in an excel file.
For example there are some files in path like


in excel file we have informatons like

111 mail address 1
112 mail address 2
113 mail address 3

we want to split the file name before ‘_’ and check it is it eequals to a column in excel file data.
if the file name is 111_file and the data in excel file is equal like 111 and 111, then process will send an email to mail address 1 via SMTP.

Our workflow is reading all file names and splitting the numbers from file names via for each activity. Also we are reading the a column in excel file via for each row activity.

When we apply an if activity and set a condition as equal, process is matching the last file 113, 111 and 112 are missing. were expecting to send emails for each file in each row. Probably the mathcing criteria is wrong.
I cannot share the project beacuse it confidential.

Thank you for the support.