How does one import filtered data from “Sheet2” into “Sheet1?

57 Views Asked by At

Objective: import filtered data from “Sheet2” into “Sheet1.”

Data is filtered in “Sheet2”, an expense table with dollar amounts in column A, and categories such as “fuel”, “meals”, “parking”, etc. in column B.

I understand that one way to do it is to make a separate sheet for each category and SUM those amounts, and import them into “Sheet1”. I am able to do that, however, I would like to use one sheet and some method to do the following:

In “Sheet2” filter the data for a determined category and display a SUM for that category in a predetermined cell in “Sheet1”.

I have shared the sheets here.

If I am shown how to do this for one category I will be able to copy and paste the function into the appropriate cells in “Sheet1” for the remaining categories.

I am aware that I may not be asking this in the best way. Thanks for all your help.

~ Joe D

1

There are 1 best solutions below

2
On BEST ANSWER
=sumif(Sheet2!B:B,"fuel",Sheet2!A:A)

The above formula works for fuel, simply change "fuel" to whatever you are trying to sum.

If you wanted to change what was in Sheet1, cell A1 to fuel instead of fuel total and changed all the other values in column A to match. Removing total (remembering to remove the space too)

You could then use this formula in cell B1, drag it down, and as new expenses were added. It would look at the name of the expense and sum it.

=sumif(Sheet2!B:B,A1,Sheet2!A:A)

If you didn't want to take out the total then the following formula should work if placed in B1 and dragged down.

=sumif(Sheet2!B:B,SUBSTITUTE(A1," total",""),Sheet2!A:A)