Question : Vlookup with Excel - Classifying transactions

I have 2 tabs within a spreadsheet for my budget.  The first tab is "Budget_Results", the second tab is "Transactions".  The transactions spreadsheet  has all my banking transactions with tags such as Restaurant, Dining, etc.  I want to be able to update the "Budget_Results" spreadsheet by viewing all the transactions from the Transaction spreadsheet and summing all the correct categories within the "Budget_Results" tab.  Thus, if I scan the transaction spreadsheet and I find 5 transactions for 10.00 that has tags of Restaurant and Dining I want the "Budget_Results" spreadsheet to reflect 50.00 in the categories called "Dining".

It seems like a vlookup would be a lot of work due to all the categories.  I plan to run this update once a week.

Answer : Vlookup with Excel - Classifying transactions

VLOOKUP will only return the first instance of a restaurant visit. You can use an array formula with INDEX and SMALL to return the other instances--but it would be much simpler to use a PivotTable as suggested by reb73.

If you don't want to go with a PivotTable, then consider using either a SUMIF or SUMPRODUCT formula like:
=SUMIF(A$2:A$1000,"Restaurant and Dining",C$2:C$1000)             item is classified in column A with amount in column C
=SUMPRODUCT(--(A$2:A$1000="Restaurant and Dining"),C$2:C$1000)

The unary operator (looks like a double negative) is not a typo in the SUMPRODUCT formula. It is there to convert the TRUE/FALSE results of the Boolean expression into 1 or 0. If you have two or more Boolean expressions in the SUMPRODUCT, then you would not need the unary operator. Having multiple Boolean expressions is the big advantage of the SUMPRODUCT formula. For example, you could capture Restaurant trips for a given week with:
=SUMPRODUCT((A$2:A$1000="Restaurant and Dining")*(B$2:B$1000>=--"1/26/09")*(B$2:B$1000<(--"1/26/09"+7)),C$2:C$1000)
The unary operator in the last SUMPRODUCT converts the text that looks like a date into a date/time serial number.

Brad
Random Solutions  
 
programming4us programming4us