Just want to document some of the Excel functions I end up using fairly frequently, but can be time consuming to reproduce.

Pull Content from Another Sheet by Matching Top Row and Left Column

Basic

=HLOOKUP(TOPROWCELL,'SOURCESHEET'!$1:$100000,MATCH(LEFTREFERENCECELL,'SOURCESHEET'!$A:$A,0),FALSE)

W/ Error Checking

=IFERROR(HLOOKUP(TOPROWCELL,'SOURCESHEET'!$1:$100000,MATCH(LEFTREFERENCECELL,'SOURCESHEET'!$A:$A,0),FALSE),"")

W/ “null” and Error Checking

=IFERROR(IF(HLOOKUP(TOPROWCELL,'SOURCESHEET'!$1:$100000,MATCH(LEFTREFERENCECELL,'SOURCESHEET'!$A:$A,0),FALSE)="null","",HLOOKUP(TOPROWCELL,'SOURCESHEET'!$1:$100000,MATCH(LEFTREFERENCECELL,'SOURCESHEET'!$A:$A,0),FALSE)),"")

Using SUMPRODUCT

=SUMPRODUCT(--('SOURCESHEET'!$A$2:$A$999999=B$1),--('SOURCESHEET'!$B$2:$B$999999=$A2),'SOURCESHEET'!$G$2:$G$999999)

or
=SUMPRODUCT(('SOURCESHEET'!$A$2:$A$999999=B$1)*('SOURCESHEET'!$B$2:$B$999999=$A2)*'SOURCESHEET'!$G$2:$G$999999)
Function requirements:

  • ALL evaluation/comparison ranges need to be exactly the same
  • Evaluation/comparison ranges should have valid, numeric data in all cells

Leave a reply