match and vlookup combo

Brass Contributor

I'm trying to retrieve the amount in January if name 'John' is also matching.  =if(match(B1,A7:C11,vlookup(A2,B7:C11,2,false))

 

Example:

Maddy1010_0-1602863174492.png

I'm trying to retrieve data using match and vlookup but it's not working.  The destination file look like:

Maddy1010_1-1602863202493.png

Can anyone help?  I'd be very grateful.  Thanks.

2 Replies

@Maddy1010 

In B2:

=SUMIFS(Sheet1!$C$2:$C$1000, Sheet1!$A$2:$A$1000, B$1, Sheet1!$B$2:$B$1000, $A2)

Fill to the right then down (or vice versa)

it works a dream!! Thanks!!!