I've used Excel for a long time, but I've just started playing around with macros, Index, VLOOKUP and other features. They're wonderful, but I've come to a roadblock.
I've managed to get Excel to paste the information below to another worksheet on the next blank row every time I press a button in sheet 1 sheet.
What I want to do now is SUM all the sale amounts and the discount amounts when I lookup an employee name.
The formulas I have on another sheet to look up the discount and sale amounts are:
=INDEX(Sales!$E$1:$E$1000,MATCH($A$1,Sales!$A$1:$A$1000,0)+14,0) =INDEX(Sales!$E$1:$E$1000,MATCH($A$1,Sales!$A$1:$A$1000,0)+16,0)
However, it seems as though it's just finding the first match.
Further down the sales sheet, there is another sale by this employee and I want the result to sum all the discount given and all the total sales amount.
I assume this is possible, but my Googling has found nothing.
Any help would be greatly appreciated!
MATCH
works - it only does find the first match. If you want to find all of the matches, you will have to use another method. Based on your description, it sounds like you may needSUMIF
orSUMIFS
. – ImaginaryHuman072889