#### How to add amount to a cell based on category and month

```I have a list of expenxe categories and by month along the top.  How can I
write the sumif function based on two criteria from drop-down list(one list
is Expenses and the second list is the Months) and the third (Amount) cell
would be where I input an amount to be added into the table:
Expenses	month	amount
Fuel	 JAN	_______

Expenses	        JAN	           FEB	MAR
Trucks/Auto
Fuel	        348.23
Oils	          35.99
Maintenance   298.33
Parts	          59.21
DMV	         745.87

--
so many functions...!?!?!?!?!?!?
```
 0
2/10/2006 10:31:18 PM
excel.newusers 15348 articles. 2 followers.

7 Replies
489 Views

Similar Articles

[PageSpeed] 53

```If you are trying to fill a matrix of expenses down and months across
with data you type in 3 cells that won't work because any formulas in
the matrix will at all times reflect the input in your 3 cells unless
you have a copy of the matrix somewhere that only contains values.

So, your table contains the values of the copy table (by means of
formulas)
the formulas will identify the field in your matrix to modify, take the
according value from the copy table, add the new amount, at which stage
you need to copy your table and paste-->special-->values it to the
other location.

start all over

It seems advisable to do the coyping and emptying by means of a macro
and a button.

Mind though that it is a fairly risky procedure since if you get
interrupted you would never know whether you copied or not. If you use
a button, however, there are ways to signal that.

example:

colour	blue
month	jan
amount	40
row	2

original				copy
jan	feb	mrz		jan	feb	mrz
green		15	9	7		15	9	7
blue		50	7	4		10	7	4
yellow		3	9	1		3	9	1

Formulas:

row (B4): =MATCH(B1;A8:A10;0)
Matrix (C8) copied to all other cells down and across:
=IF(AND(\$B\$2=C\$7;\$B\$4=ROW(\$C8)-ROW(\$C\$7));G8+\$B\$3;G8)
You may have to replace the semicolons with commas depending on your
local Windows setting for regional and language

Hans

```
 0
hansyt (53)
2/11/2006 2:07:51 PM
```Ok, I don't think I explained myself better, sorry, my fault.  At the top I
have a labeled drop-down list tied to the list of expense categories(Fuel,
Repairs etc...) next to it is another drop-down list tied to the months(JAN,
FEB, MAR, etc...) next to that is a cell labeled Amount with a cell below it
to input an Dollar amount for a maybe fuel receipt for the month of JAN and
it would add itself to that particluar cell.  Then say the next receipt in
line is a receipt for a REPAIR for the month of FEB and it would atumatically
add itself to that cell intersecting REPAIR and FEB. I have seen some
questions similar but in reverse it seems on this site and I can't seem to
get it right.  The cell intersecting an EXPENSE category and MONTH would
recognize an amount entered under AMOUNT and added to whatever was entered
previously.  Something lif IF CATEGORY IS FUEL AND MONTH IS JAN THEN ADD
appropiate cell.  I had something similar under access but I kinda needed to
be in excell and when I copy and try to past in excell it won't work.  Thank
you Mr. flummi for your help.
--
so many functions...!?!?!?!?!?!?

```
 0
2/13/2006 1:54:04 AM
```Hi,

there's 2 ways to understand your design:

1. You have row 2 at the top to specify the type of expense, the month
and to enter a Dollar amount. Below that you have the expense
categories listed in a column say A4:A10 and the months listed across
say in B3:M3 and in e.g. B4:M10 (for 10 expense categories) you have
the accumulators for the expense amounts. Everytime you select a
category and a month and enter an amount in row 2 you want to add the
amount in the cell intersecting the expense category in A4:A10 and the
month in B3:M3.

This is what I described in my first post. It is not possible with
normal Excel formulas because in Excel you cannot have a formula like
=A3=A3+B4. This will result in an error message "circular reference".
The only sensible way to oranize this seems a command button  with an
associated macro that, if the button is clicked, adds the input amount
to the correct cell in your expense matrix.

2. You have kind of a journal design. columns A, B and C hold your
input data per line. Columns D:O have the amount in Column C in the
correct month. like in this example:

Expenses table
jan	feb	mrz	apr	mai
category	month	amount
Fuel	jan	45,00	45,00
Repair	feb	112,50		112,50
hotel	feb	245,00		245,00
tyres	jan	256,00	256,00
Penalty	mrz	70,00			70,00

Total	301,00	357,50	70,00

The formula in D4 is simple: =IF(\$B4=D\$2;\$C4;0)
copied down and across as required.

This means, when you have a new expense you enter it in a new row, copy
the formulas from the previous row into the new one and that's it. Any
sums you would display at the bottom. If you want the total amount per
Category and month use a different area on the same sheet or a
different sheet and extract the information from your "journal".

Does that make sense?

Hans

```
 0
hansyt (53)
2/13/2006 6:59:14 AM
```Mr. Flummi
thank you for answering my questions.  yes, I was getting a "circular"
answear. it works in access, but I have to keep tables for every expense and
I wanted to see the table and also input.  it's just much easier to set up in
excell and much faster to set up.
so many functions...!?!?!?!?!?!?

"flummi" wrote:

> Hi,
>
> there's 2 ways to understand your design:
>
> 1. You have row 2 at the top to specify the type of expense, the month
> and to enter a Dollar amount. Below that you have the expense
> categories listed in a column say A4:A10 and the months listed across
> say in B3:M3 and in e.g. B4:M10 (for 10 expense categories) you have
> the accumulators for the expense amounts. Everytime you select a
> category and a month and enter an amount in row 2 you want to add the
> amount in the cell intersecting the expense category in A4:A10 and the
> month in B3:M3.
>
> This is what I described in my first post. It is not possible with
> normal Excel formulas because in Excel you cannot have a formula like
> =A3=A3+B4. This will result in an error message "circular reference".
> The only sensible way to oranize this seems a command button  with an
> associated macro that, if the button is clicked, adds the input amount
> to the correct cell in your expense matrix.
>
> 2. You have kind of a journal design. columns A, B and C hold your
> input data per line. Columns D:O have the amount in Column C in the
> correct month. like in this example:
>
> Expenses table
> 			jan	feb	mrz	apr	mai
> category	month	amount
> Fuel	jan	45,00	45,00
> Repair	feb	112,50		112,50
> hotel	feb	245,00		245,00
> tyres	jan	256,00	256,00
> Penalty	mrz	70,00			70,00
>
> 		Total	301,00	357,50	70,00
>
> The formula in D4 is simple: =IF(\$B4=D\$2;\$C4;0)
> copied down and across as required.
>
> This means, when you have a new expense you enter it in a new row, copy
> the formulas from the previous row into the new one and that's it. Any
> sums you would display at the bottom. If you want the total amount per
> Category and month use a different area on the same sheet or a
> different sheet and extract the information from your "journal".
>
> Does that make sense?
>
> Hans
>
>
```
 0
2/13/2006 8:39:26 PM
```Hi,

You are welcome.

What I can offer is that you send me via email a spreadsheet how you
want it to look and I'll organize it for you.

Hans

```
 0
hansyt (53)
2/14/2006 7:31:59 AM
``` am trying to design a template that I can use for a auto fuel expense sheet.
I need something that includes:- date, place, odometer reading, number of
kilometers, number of liters, cost per liter, number of liters per hundred
kilometers. I am a brand new user of excel and need all the help I can get.
Is thewre a template that I can download for this or will I have to make one.
Thank you.
Ron G

"flummi" wrote:

> Hi,
>
> You are welcome.
>
> What I can offer is that you send me via email a spreadsheet how you
> want it to look and I'll organize it for you.
>
> Hans
>
>
```
 0
RonG (3)
4/21/2008 11:53:11 PM
```Hi Ron
Go to Cimjet
http://office.microsoft.com/en-us/templates/default.aspx
Do a search for your template, select the one you like and most likely it
will need to be converted to metric.
If you need held to convert the form, will be more than happy to help.
Regards
Cimjet
"Ron G" <RonG@discussions.microsoft.com> wrote in message
news:5881E2A7-F679-4FA0-BD6A-6BC123B8CED8@microsoft.com...
> am trying to design a template that I can use for a auto fuel expense
> sheet.
> I need something that includes:- date, place, odometer reading, number of
> kilometers, number of liters, cost per liter, number of liters per hundred
> kilometers. I am a brand new user of excel and need all the help I can
> get.
> Is thewre a template that I can download for this or will I have to make
> one.
> Thank you.
> Ron G
>
> "flummi" wrote:
>
>> Hi,
>>
>> You are welcome.
>>
>> What I can offer is that you send me via email a spreadsheet how you
>> want it to look and I'll organize it for you.
>>
>> Hans
>>
>>

```
 0
300 (30)
4/22/2008 12:15:05 PM

Similar Artilces:

Cells #3
How I can make a cell contact with another cell on another sheet and it will changes when day changes. example I have cell A1 sheet1 contact with cell A2 sheet 2 and cell A1 sheet 2 is the date when the date change A1 sheet 1 will auto change to B2 sheet 2 and the date = B2 Ali, You could use the CHOOSE function which returns the nth value. For example, =CHOOSE(3, A2, B3, C4, D5, E6) will return A4, the third value in the array {A2, B3, C4, D5, E6}. This works well if the cells are not contiguous, but you are limited to 30 values if I remember well. If your values are in contiguous ce...

I have a workbook with about 40 worksheets, there are links between the workbooks that sporadically do not update. I have checked the links when they freeze and have been unable to identify the cause. Eg cell c76=a number from a lookup table, is referenced throughout the workbook, in various functions. When c76 changes the functions freeze on the previous output of c76. The lookup table works and c76 changes accordingly, but the related functions do not. WHY Thanks in advance ...

Run macro via cell value
Is it possible to run a macro based on the value of a cell. Say for example A1 contains the word "run" can that word be the trigger to automatically run a macro? Pat Hi Pat A worksheet formula can not trig a macro. No way. But a worksheet has several events; macros that run when certain things happen. There is an event firing when you enter something into a cell, another when the sheet recalculates, ... see http://www.cpearson.com/excel/events.htm for more on this. HTH. Best wishes Harald "Pat" <glass_patrick@hotmail.com> skrev i melding news:OV4A5QBUFHA.58...

I need to add 4 "technical contact" fields (which would lookup the Contact entity) to the CONTRACT form. Is this possible? I've found it difficult to figure out what to do first. Thanks in advance, Brandon Not possible. You cant have multiple lookups for the same entity. You also cannot create new relationships between two system entitites. This will work in 4.0 Not possible, Pezman. N:M relationships are not possible in 3.0 yet. There is a alternative solution: a new entity to act as an N:M relationship. In your case, Contract/Contact. This entity has two 1:N relations...

Problems on Web based interface .
problem 1: I want to combine html help into my win32 program interface, and in my html help, i have some files links waiting for users click and then the my program would evoke an open operation such as open, trasfer, deleting and so on. How to solve this problem ? somebody told me to write ActiveX embeded control and register them to the system . Is there any better way to do that ? visual studio.net were an example for partial web based interface. problem 2: Do i need to pack my html files into my program, and extract them when my program launched ? Thus such web based interface scure ?, I...

What is the name of the template wizard with Data Tracking (Excel. I can not locate the add in template wizard with Data Tracking in Office 2003 Hi Richard You are not the only one<g> The Add-in is working in 2003 only the install file is not working. Copy the xla file from a PC with 2002 to the PC with 2003 and it will work(use Tools>add-ins to browse to the file in Excel) -- Regards Ron de Bruin http://www.rondebruin.nl "Richard" <Richard@discussions.microsoft.com> wrote in message news:193C5DFD-578D-48F7-B9D6-9FEF5BDCEB64@microsoft.com... > What is t...

form cell question in Ver2000

Hello, Here is a scenerio. A client is buying 1lb of ham. It is put on a waxed paper then wrapped into a white paper and then put into a shopping bag. The usage of shopping bag is 100% cases the usage of paper is only with certin categories of sales. Same with the waxed paper. Question: Is there a way of associating wax paper, white paper and shopping bags in a way so with every sale a piece of paper gets deducted from inventory and one bag is deducted from inventory? I would like to run a report every so often and see if I need to purchase any supplies. Kits and assembly do not work...

add a row or column to a single cell in exel
I am trying to split a single cell into 2 rows can you help If I understood correctly you want to enter an entry in two lines in a cell at appropirate place hit lt+enter and again hit enter for e.g venkat (alt+enter) raman(enter) "trev" <trev@discussions.microsoft.com> wrote in message news:89B2C15C-057F-43B9-8282-37923D5EA397@microsoft.com... > I am trying to split a single cell into 2 rows can you help ...

I am trying to link many cells on one worksheet to corresponding cells on another. I have two worksheets, one with item price information and another with physical item information. Both sheets share a common "number" field. Each item has unique number that is referenced on both sheets. I want to set up a hyperlink so that when the when any cell in the number field in the price file is clicked, it lgoes to the cell with that same value in the number field on the other sheet. I can do this by one cell at a time by right clicking the cell, adding the hyperlink and setting...

Free Health Incentive Scheme up to US\$64K monthly
For those who concern about their health and wealth at the same time, this is quite interesting website to visit: http://www.health-scheme.com Be the lucky participant, at least the first participant for the month to get the incentive!! ...

Is there a way to delete old or no longer used email addresses that appear in the drop down box when I am addressing a new email? Shebubba wrote: > Is there a way to delete old or no longer used email addresses that appear in > the drop down box when I am addressing a new email? That is the nickname cache. Search and delete the .nk2 file. That's the cache for nicknames (i.e., your manually entered e-mail addresses). If you only want to delete some of them, highlight an entry and hit the delete key. If that doesn't work, use Nirsoft's NK2 Viewer utility (it e...

my formated column is displaying one cell incorrectly
I have a spreadsheet with 4 columns; the 4th columns is a formula going across the 3 columns a+b-c = d with d preferably equally zero. When I format column d almost all of the columns that equal zero display as a dash (preference). However periodically one or two of the rows will display as 0.00 and I can't seem to get the formatting to change to the dash. I have tried to reformat all columns all other cells and to no avail. Has anyone else run into this issue and if so how have u solved it. The only way I can solve it is to actually put a zero in the cell. If the numb...

Referencing cells
Hi, I posted earlier but got no response. I think my explanation then was too difficult to understand so I'm trying again. I hope this time it is more easily understandable In Workbook 1 "Exp_06.xls", I have a column of numbers starting on row 23 as shown. 23 1000 24 500 etc.etc. Each cell in the column is named, for example cell "A23" is named "AutoInsurance" and cell "A24" is named "AutoGasoline". The formula bar for each cell contains only the number in the cell and does not reference the cells name. In Workbook ...

Every time I open Outlook 2007 I get an error message regarding an add-in 'DCCExtensions' (DCCEXT32.DLL). It says the add-in cannot be loaded and has been disabled by Outlook. I've been getting this message ever since I uninstalled Winfax. How do I make this error stop appearing? Thanks. -- kapibarra Remove the addin from OL by using Trust Center, Addins. http://office.microsoft.com/en-us/outlook/HA100341271033.aspx#14 "kapibarra" wrote: > Every time I open Outlook 2007 I get an error > message regarding an add-in 'DCCExtensions' (DCCEXT32.DLL). ...

Replacing Cell Contents
Hello Folks Is there any way via formula to replace the contents of Cell A1 with a formula written in B1 or any other cell? Thanks Hi no way to achieve this with formulas. Formulas can only return values but not change other cells -- Regards Frank Kabel Frankfurt, Germany Bob Leathers wrote: > Hello Folks > > Is there any way via formula to replace the contents of Cell A1 with a > formula written in B1 or any other cell? > > Thanks Thanks for your reply. Is there then a way, via macro, to continually check to see if the value in cell A1 has changed? If so change th...

How do I increase the text size of an Excel cell?
Hi guys, Situation: I had a memo size field in MS Access. When I copied and pasted it into an MS Excel cell the text gets truncated? I can't believe that Microsoft has had about 5-6 versions of Excel and hasn't fixed this simple problem. Mike Web Developer and Catholic Apologist http://www.faithfulchristians.net I think this is by design. Not everyone would want the whole column resized because of a single truncated cell. "Mike_Humphrey" <Mike_Humphrey@discussions.microsoft.com> wrote in message news:79662172-C13B-4708-AAF4-B02511AD79AA@microsoft.com... > H...

I have two fields that should match, but one includes special characters while the other does not. Example: Field1 00ABCD123456123 Filed2 00/ABCD/123456/123/SBZ I need to find records where these two fields don't match, either by changing the display of one of them, or a query to compare Field1 character 7-15 with Field2 characters 9-14, 16-18. Hope this makes sense. Can anyone help? Thanks! Take a look at the following from the Access Help file it might be what you're looking for... Extract a part of a text value The following table lists examples of expressions that ...

SumIFS Cell
I am trying to reference a cell in a formula and I would like to say anything greater then cell J2 but when I input this it searches for text. =SUMIFS(\$B\$2:\$B\$27,\$A\$2:\$A\$27,"000001",\$C\$2:\$C\$27,>D2) A B C D 1 00001 100 40248 40248 2 12001 150 40237 3 15001 200 40237 4 00001 150 40290 5 00001 50 40350 I would like the total to return 200 because Cell C5 and C4 are larger than Cell D1 in respect to the Sku number I would like to sum. But when I put in >J2 it enters “>J2” and it won’t return a value other then 0. (If I put in just D2 then it returns a valu...

Rank a Column + 1 cell from 2nd Col
I have 6 columns: A B C D E F 274 1 269 ? 279 ? 275 2 270 ? 280 ? 276 3 271 ? 281 ? 288 4 283 ? 293 ? Column B represents a simple 'Rank' of Column A In the first row of column 'D' I want the rank of the 269 in relatio to the figures in column 'A' which equals 1. I also want the rank o 270, 271 & 272 in relation to their position on Column 'A' - whic would equal 1, 1, 4 In Column 'F' I want the rank of those figures in 'E' relation to th values of column 'A'. Which would equal 4, 4, 4, 5 Any help would ...