Formula to compare & autofill

--------------------------------------------------------------------------------

Urgent!!

I need a formula to check, match en found and autofill data in two different sheets. I have tried the if, match and vlookup, but maybe i'm just stupid!!!
eg. the constants is in sheet A and the variables in sheet B all in the same workbook.
colums to be checked, is E, F, G, H, J, & K
If all the data is equal, i then need the data in column M on sheet B to be autofilled in sheet A in column M.
if more than one exact comparision found, the values in column M must be added up to give a total sum.
if no comparision is found that line must be skipped and maybe a warn message be posted in that cell.
I then furthermore need a sort of exception report.
Do hope u understand what i want.
kind regards
ronette