Looking up data using multiple criteria

joseway1979

New Member
Joined
Nov 10, 2014
Messages
11
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

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Weazel

Well-known Member
Joined
Dec 24, 2011
Messages
3,155
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​
marTaskJanFebMar
2​
repairsCleaning
20​
35​
45​
3​
30​
Repairs
10​
20​
30​

<tbody>
</tbody>
 

Airfix9

Well-known Member
Joined
Sep 23, 2005
Messages
886
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)
 

Watch MrExcel Video

Forum statistics

Threads
1,130,047
Messages
5,639,766
Members
417,109
Latest member
996

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
Top