I am using vba macros.
A task:
1) The user will provide two inputs: the number of devices sold (column B) and the week number (column A).
2) Find the excel file using these two and make a profit.
(Conditions:
1. We do not need to change anything in the excel file.
2.And we must first find devices sold , and then we can go to week number .)
Note: I actually have a different problem, this is a generalization for this.
I used the find function, but I do not understand why it works.
Please tell what to do.
Consider entering 11 and week 3 (so do a search of 11 and then check if it matches week 3 or not. If not, go to the next one. I tried this, but ended up in an infinite loop.)

source share