• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Excel formula to get totals with vertical & horizontal lookup

Twiggy

New Member
Hi Excel Experts,

I've attached the file Test.xls. It's a copy of my production file with one row in it. The actual file has about 40,000 rows in each sheet.

There are two sheets in Test.xls. The first sheet is Data_File, where I'll store the results. The second sheet, Import_FIle, that contains the records I'm importing from Access. I run a cross-tab in Access to get the totals per week.

I’m using the criteria in the sheet Data_File:A11&C11&E11&N9 to find the total for week 2016*01 in the corresponding record in the Import File.

Expected Result: Data_File:N11=135.

The challenge is that I need a formula to do a vertical and a horizontal lookup without significantly slowing down performance. I considered using Index Match Match, but it looks like I’d need to list the entire array. I think that’ll be too large since my production file already has 40,000 rows. I appreciate any suggestions you can provide. Please let me know if I need to clarify.

Thanks in advance for your time.
 

Attachments

Twiggy

Firstly, Welcome to the Chandoo.org Forums

N11: =INDEX(Import_File!$A$2:$AY$40000,MATCH($A11&$C11&$E11,Import_File!$A$2:$A$40000&Import_File!$C$2:$C$40000&Import_File!$E$2:$E$40000,0) ,MATCH(N$9,TestTable[#Headers],0)) Ctrl+Shift+Enter

Then Copy across and down
 
Hi Hui,
Thank you for welcoming me to the forum.
And thank you for the formula.
It works perfectly.
I really appreciate your time!
Aspiring Excel Ninja,
Twiggy:)
 
Back
Top