Hi guys, I was wondering if you have some idea on how to do this. I have been trying with formulas, but not getting very far, so am hoping there is a way of doing this with macros. I am presently learning about macros (very slowly), so any helpful hints in the code, or even just a general shove in the right direction for me to figure it out myself would be most appreciated

I am trying to compare various columns on the same row on one sheet, to various columns on all the rows on another sheet, and to add up the numbers in column M when there is a match.



Match 1:
If the value in F1 appears in Sheet 2, column F
Then add up numbers in Sheet 2, column M on the corresponding rows
SUMIF(Sheet2!F:F,F1,Sheet2!M:M)


Match 2:
If the value in D1 appears in Sheet 2, column A and the value in E1 appears in Sheet 2, column B on the same row, then add up numbers in Sheet 2, column M on corresponding rows.
I’m having trouble with that one, because with VLookup it will only return the first value. I thought about letting it return multiple values and then comparing the results with cell E1, but I only have one row per entry, and for multiple values I would need blanks rows directly below.

Odd addition if possible:
Match 2, plus the first word in G1 compared to the first word in Sheet2, Column H on the same row.

Overall:
If the sum of numbers from column M does not exceed 25, delete the row. If it does, show the sum.
I know this last one needs a macro rather than a formula anyway. As I use the IF function a lot in formulas, I am especially keen to get the hang of this one in macro form.

Would anybody be able to help with this? Any assistance would be most appreciated.