Help with INDEX and MATCH and MID

Sean15

Well-known Member
Joined
Jun 25, 2005
Messages
698
Office Version
  1. 2010
Platform
  1. Windows
Hi:

I am trying to compare data from two pivot tables.

Formula below in E4 of worksheet pivot table 2 is trying to returning to return required values from worksheet pivot table 1 but Excel is returning #VALUE

=INDEX('pivot table1'!$B$6:$B$49,MATCH(B5,MID('pivot table1'!$A$6:$A$49,5,7)*1),0)

Could you help please?

Regards,

Sean
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi:

I am trying to compare data from two pivot tables.

Formula below in E4 of worksheet pivot table 2 is trying to returning to return required values from worksheet pivot table 1 but Excel is returning #VALUE

=INDEX('pivot table1'!$B$6:$B$49,MATCH(B5,MID('pivot table1'!$A$6:$A$49,5,7)*1),0)

Could you help please?

Regards,

Sean

Change the 0 at the end of the formula to 1
or delete the 0 and the comma before it
 
Last edited:
Upvote 0
Hi:

Suggestions in post #2 still returns #VALUE .

Example of values in column B of pivot table1: 123-4562566-220-----

Example of values in column B of pivot table2: 4562566


Regards,

Sean
 
Upvote 0
Hi:

Suggestions in post #2 still returns #VALUE .

Example of values in column B of pivot table1: 123-4562566-220-----


Example of values in column B of pivot table2: 4562566


Regards,

Sean
without seeing the full pivot table and data it's going to be hard for me to diagnose
you can try to double click into the cell with your formula and highlight this with the cursor : MATCH(B5,MID('pivot table1'!$A$6:$A$49,5,7)*1) and then press F9 to calculate it, and see what this part of the formula is giving you, is it giving you the row you are looking for in the row labels?
 
Last edited:
Upvote 0
without seeing the full pivot table and data it's going to be hard for me to diagnose
you can try to double click into the cell with your formula and highlight this with the cursor : MATCH(B5,MID('pivot table1'!$A$6:$A$49,5,7)*1) and then press F9 to calculate it, and see what this part of the formula is giving you, is it giving you the row you are looking for in the row labels?

You may have to enter the formula with Ctrl + Shift + Enter, as an array formula. double click in it and hit control + shift + enter
 
Upvote 0
Hi:

Pressing F9 returns:

=INDEX('pivot table1'!$B$6:$B$49,3)


Sean
 
Upvote 0
Hi:

Pressing F9 returns:

=INDEX('pivot table1'!$B$6:$B$49,3)


Sean

make sure to undo after calculating, cause it will change your formula

Okay 3, is that the row you want? the 3rd item in your row headers?


double click in the formula and hit Ctrl + Shift + Enter, see if that makes it work
 
Upvote 0
You may have to enter the formula with Ctrl + Shift + Enter, as an array formula. double click in it and hit control + shift + enter

Yep, the array works. Thanks very much.

But, could this be done without an array formula?

Sean
 
Upvote 0
Yep, the array works. Thanks very much.

But, could this be done without an array formula?

Sean

You you can create a column next to your 2nd pivot table, to return the values for each item in pivot table 1, you want to check them against each other right?
And if they aren't in the same order you can use a vlookup to say look at item 1 in pivot table 2, and find this item in pivot table 1, and return the value from pivot table 1. then you can compare the values in each table
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,732
Members
448,987
Latest member
marion_davis

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