Prev Previous Post   Next Post Next
  #5   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I protect cell formulas used for daily counts? Pilar Excel Worksheet Functions 0 March 4th 05 11:59 PM
how do i copy vertical formulas to horizonal and keep same cell r. opiedrake Excel Discussion (Misc queries) 3 January 12th 05 05:18 PM
Cell Formats in formulas C. Lewis Excel Discussion (Misc queries) 1 January 5th 05 06:37 PM
Formulas appear in cell instead of formula result tommcbrny Excel Worksheet Functions 3 November 30th 04 08:44 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 12:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"