Index match formula??

vicbri

New Member
Joined
Sep 5, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi, I am hoping someone can help me understand what I am doing wrong and help point me in the right direction...
I have a very large spreadsheet with a number of sheets. One of these sheets is to draw information from another one and I am having some difficulty getting the information I am wanting. After researching the formulas that are possible I believe the index/match formula would be the one to use, however, I am either not understanding it properly or entering it all wrong.
This is what I am trying to acheive:
Sheet A: Monthly sales/purchase data (always changing as new months are added to the sheet)
Sheet B: Yearly figures
Sheet A works horizontally with new months pushing the old to the right as they are added and includes totals for each month of "net sales", "gross sales", "GST", "purchases" etc.
So... for example, how can I return the value of "Sales" (4500) for the month of April 22 to SHEET B? I am wanting Sheet B to automatically populate with the information rather than me having to manually enter every figure in each month. I have attached an example of what I am trying to do and tried using the index/match formula as follows:
=INDEX(SheetA!2:5,MATCH(SheetB!A3,SheetA!1:1)+3,2)
(I did try to upload a minisheet- but was unable to so I do hope the images are okay).
Thanks in advance for anyone who can help with this.
 

Attachments

  • SheetA.PNG
    SheetA.PNG
    14.5 KB · Views: 17
  • sheetB.PNG
    sheetB.PNG
    9.9 KB · Views: 30

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Try this:
Excel Formula:
=INDEX(SheetA!2:5,1,MATCH(A3,SheetA!1:1)+1)
Thank you SO much! It works!! I was just becoming resigned to the thought that I would be entering them in every month!! Huge time savings and the formula makes a lot more sense to me now too!! Thanks so much Alex, I really appreciate your time!! :D
 
Upvote 0
You're welcome.
The main issue was that you had the row and column references reversed.
The syntax is:
=INDEX( table, row_number, column_number )
Also you specified the range as rows 2:5, sales was on row 2 which is row position 1 in the Range 2:5.

The end result is also cleaner if you remove the Sheet reference in front of any cell references that are on the same sheet as the one containing the formula.
eg formula was on SheetB so A3 will assume SheetB without having that in there cluttering up the formula. ;)
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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