Index or Vlookup?

TheDigital

New Member
Joined
Jul 1, 2022
Messages
3
Office Version
  1. 2021
Platform
  1. Windows
Hello there,

I'm trying to create a somewhat simple function where I grab active information from one sheet and populate it into another sheet.

  • On the first sheet, I have a list for how much spending was done on an item and the reason the item was bought in a drop down menu.
  • The second sheet, I'm trying to pull in information based off of how many times the item appeared and the total cost all together.

I've tried using vlookup but due to the sheet's layout, I cannot use this since it only looks at values to the right. When using Index, however, it works only for one list item and then I get a #ref for any other item.

Any assistance with this would be great! See below for example.

1st Sheet: Payments

1656685090789.png

Book1
AB
1Date
2Amount PaidReason
3$50.00Bills
4$60.00Events
5$250.00Bills
6$783.00Gift
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Payments
Cells with Data Validation
CellAllowCriteria
B3:B32List=Reasons




2nd Sheet: Backend

1656685161747.png


Book1
AB
1Date
2ReasonsTotal Amount Spent
3Bills$1,143.00
4Business#N/A
5Clothing#N/A
6Eating Out#N/A
7Events#REF!
8Gas#N/A
9Gift#REF!
10Groceries#N/A
11Grooming#N/A
12Leisure#N/A
13Medical#N/A
14Other#N/A
15Pet#N/A
16Rent#N/A
17Subscription#N/A
18Trip#N/A
19Vacation#N/A
Backend
Cell Formulas
RangeFormula
B3:B19B3=SUM(INDEX(Payments!$A$3:$A$32,,MATCH(Backend!A3,Payments!$B$3:B$32,0)))
Named Ranges
NameRefers ToCells
Reasons=Backend!$A$3:$A$19B3
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hi & welcome to MrExcel.
How about
Excel Formula:
=SUMIFS(Payments!$A$3:$A$32,Payments!$B$3:B$32,A3)
 
Upvote 0
Hi & welcome to MrExcel.
How about
Excel Formula:
=SUMIFS(Payments!$A$3:$A$32,Payments!$B$3:B$32,A3)
Thanks for the quick reply. Worked. You're awesome! I had saw this something like this during my research but had no idea that this would work.

Very much appreciated.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,965
Messages
6,122,496
Members
449,089
Latest member
Raviguru

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