# Looking up data using multiple criteria

#### joseway1979

##### New Member
Hi,

I need to be able to get an amount spent per month on certain tasks.

My spreadsheet has costs for cleaning, repairs, etc corresponding to each month, see below;

Jan Feb Mar
Cleaning 10 10 10
Repairs 10 10 10

What I want to do is get a total cost per month for each task, but by typing the month into the cell, so, I would want to type Feb into A1 and I would imagine I would need to type Repairs into A2 and that would give me 10 in A3.

Hope that's clear.

Any help is much appreciated.

### Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a \$25,000 loan, 5% annual interest, 60 month loan.
maybe something like...

a3=SUMIF(C2:C3,A2,INDEX(D2:F3,,MATCH(A1,D1:F1,0)))

 Row\Col A​ B​ C​ D​ E​ F​ 1​ mar Task Jan Feb Mar 2​ repairs Cleaning 20​ 35​ 45​ 3​ 30​ Repairs 10​ 20​ 30​

<tbody>
</tbody>

I put the data in cells B1:E3, the month to match in A1, the cost type in A2 and in A3 used this formula:

=HLOOKUP(A1,B1:E3,MATCH(A2,B2:B3)+1,0)

Replies
1
Views
184
Replies
0
Views
107
Replies
2
Views
170
Replies
7
Views
384
Replies
1
Views
123

1,214,657
Messages
6,120,775
Members
448,991
Latest member
Hanakoro

### 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.

### Which adblocker are you using?

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

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