Need to find a value that matches two columns of criteria. Possible VLOOKUP

前端 未结 5 1723
不思量自难忘°
不思量自难忘° 2020-12-11 09:05

Update Below -- 6/4

I have two worksheets in excel. One is a list of donors with their check#/amount/ Donor ID ( \"donations\" worksheet) a

5条回答
  •  一个人的身影
    2020-12-11 09:13

    One quick way out of this problem is to create a Pivot Table on the Donations data and then use GETPIVOTDATA to pull values out of it to get the donation id on the Quickbooks table.

    This is easily done if the donation ID is always numeric. You set up a Pivot Table with row fields including check number and amount. You then set the values to be equal to MIN or MAX of the donation ID. If there is only one result you will get it immediately. If there is a clash, you can determine this by switching over to COUNT and flag any of those >1.

    Once you have the table set up with MAX you can then quickly use GETPIVOTDATA to pull in the matching value.

    This assumes that your amount values are close enough (in the floating point decimal sense) to match. Nearly all will be. Some may not. If you can get 50k records down to 100 though to double check, then life is good.

    Picture of sample data and Pivot set up, shows the Pivot Table built on the left data (with the donation ID). The lookup data is on the right.

    data and pivot

    Formula for the lookup is a simple GETPIVOTDATA, this is in cell F3 and copied down.

    =GETPIVOTDATA("Donation",$B$10,"Check",G3,"Amount",H3)
    

    You will get the #REF! error if a match is not made. See the last row for an example.

提交回复
热议问题