Home |
Search |
Today's Posts |
#5
![]() |
|||
|
|||
![]()
Hi
It is possible with worksheets change event. But I myself consider this as very bad idea - when you enter some wrong number, it will be practically impossible to track down the error later. Instead I advice to use the design, where all transactions are gathered into single table, and running total is calculated from this table. As bonus, you can design reort sheets, where p.e. all transactions for selected period, along with totals for period start and end dates, are displayed. An example of transaction table: Sheet: Transactions Date, Operation, Sum, Comment The column Operation contains validation list with 2 selections: "payd" and "recieved"; Sum is always positive. At start you enter the start value for your account (as "recieved"). In Comment field you can enter some explanation, so you don't get confused later. The table will be simplest to calculate, when you never don't have any transactions earlier than start transaction, and you have only one start transaction at any time. You define dynamic named ranges (p.e. Date, Operation and Sum) for tables datarange, using Date column as check range (so that all 3 named ranges are always of same dimension) The total will be: =SUMIF(Operation,"recieved",Sum)-SUMIF(Operation,"payd",Sum) When the number of rows in table grows, and you want to remove some elder transactions, then you have to calculate the total for date, which will be new start date (date0), enter the new start value, and delete all rows with dates earlier as new start date (you can write a procedure for this). The worksheet formula to calculate total for some fixed date (FixedDate) is: =SUMPRODUCT(--(Date<FixedDate),--(Operation="recieved"),Sum)-SUMPRODUCT(--(D ate<FixedDate),--(Operation="payd"),Sum) Arvi Laanemets "Patrick" wrote in message ... I am creating a spreadsheet for my acount payables and recievables. I want to designate a cell to keep a total. I need one cell whenever I add a figure it add to the total and another cell whenever I subtract a figure it will subtract from that same cell. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I protect cell formulas used for daily counts? | Excel Worksheet Functions | |||
how do i copy vertical formulas to horizonal and keep same cell r. | Excel Discussion (Misc queries) | |||
Cell Formats in formulas | Excel Discussion (Misc queries) | |||
Formulas appear in cell instead of formula result | Excel Worksheet Functions | |||
GET.CELL | Excel Worksheet Functions |