The code is doing exactly what I wanted to. But when I try to put a formula in A3 (sheet L1)
=if(e3="max",1,if(e3="min",2)) by right, the value in C3 (sheet L1) should lookup A3 (sheet L1) and return the corresponding value from Database like a normal vlookup.

I need this code, because so far, it is able to return a vlookup along with comment (text and picture).

Unfortunately, if I put a formula column A (any cell), it would disrupt the code?
I'm so sorry if my explanation if confusing, but could you please take a look a the sample sheet.