Replacing VLOOKUP with index match with SUM option

Henceman

New Member
Joined
Oct 9, 2017
Messages
46
I have attached an example file, with working vlookup formula which Im trying to get rid of, so I do not need time to create pivotable to help the formula out.

What the working lookup is currently doing:

1) 1st worksheet contains list of settlements with amounts, there might be several settlements with same number, but in different value in SEK.

2) Second worksheet contains similar information


1st pivot in worksheet counts the instances of settlements
2nd pivot shows the total settlement values per settlement

vlookup compares the information from 2nd pivot and pivot in another worksheet(pivot3), subtracts the value in 2nd pivot and returns a number.

If the resulting number is zero, that means the total difference between same order in 1st and 2nd worksheet are an exact match and can be handled, N/A means the same settlement is not found and any other number means the sums do not add up.

Right now matching settlements are marked with yellow color.

SO can all this be replaced with handy index match with sumif? :)

Example:
https://files.fm/u/w7s87c24#_
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Hi Henceman,

I can view a snapshot of your file with the pivot tables but can't download it, my ISP is blocking the download site...

From what you write I don't think you need any lookup, why don't you use SUMIF on the two original data tables?
 
Upvote 0
Really strange, but heres another link... and another http://www.filedropper.com/grayham
https://ufile.io/44vj5

I dont get how sumif would help, I don`t have the value of settlements known, to search for it.


Hi Henceman,

I can view a snapshot of your file with the pivot tables but can't download it, my ISP is blocking the download site...

From what you write I don't think you need any lookup, why don't you use SUMIF on the two original data tables?
 
Upvote 0
Hi !

1st and 2nd pivot can be just one table, you can drag the Amount in SEK column to values field twice, set one to COUNT and the other one to SUM

Putting the SUMIF next to it should produce the same outcome as your Pivot3 and VLOOKUP combination, it works in my test

FGHI
1st Pivot
Row LabelsCount of Amount in SEKSum of Amount in SEKsumcheck
14420170731247.95=H3+SUMIF(grind!B:B,F3,grind!C:C)
45802466141714.85714.85
4580256033129002900
4580259792187005800
45802617671384384
458026198419726.51-37371.19
4580262677193427.5493427.54
45802643741920
45802648071867.9149.4
45802648401218.080

<colgroup><col><col><col span="2"></colgroup><tbody>
</tbody>

Does this help?
 
Upvote 0
Alternatively, since the amonts in 'grind' are all negative, you could paste all that data in the same table on 'abc', do the pivot and make SUM of AMOUNT, you'll get 0 where the amounts match and the difference where it doesn't
 
Upvote 0
Thank you for working solution, sorry for late feedback.


Is there also a solution, which compares individual settlements in "abc" and "grind" worksheets and I can filter out the ones with value zero (means same settlement number is found on both worksheets and their difference in amount is zero).
Then I could see the matching "Secular "for the settlement as well.

Attaching vlookup example.

https://imgur.com/a/LdvTM

Note, that this as imagined required pivottable on grind sheet, to take together single instances of settlements with matching Seculars.

Thank you.
 
Upvote 0
Forgot to mention, that if you see different amount than zero and still same Secular, it may have got the value other way, right now im interested only in straight matches with corresponding secular.
 
Upvote 0

Forum statistics

Threads
1,215,338
Messages
6,124,346
Members
449,155
Latest member
ravioli44

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top