Bug 45372

Summary: Provide a WALKUP() function
Product: LibreOffice Reporter: Terri <tlmoore>
Component: SpreadsheetAssignee: Not Assigned <libreoffice-bugs>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: medium    
Version: 3.4.4 release   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Shows formulas now and hints at what a walkup function would look like.

Description Terri 2012-01-29 08:15:12 UTC
I would like to propose a walkup function.  The purpose of the function is to walk up a column testing for a value that is displayed.  When it finds a displayed value, it returns the row.
   Spreadsheets originally tried to mimic a ledger.  A ledger uses a few columns on the left that have identifying info like, a date, a description, and a dollar amount of the purchase or expense. The columns to the right of those normally indicate various logical accounts with the effect of the transaction on that particular account. An entry is made in the transaction amount in the first set of columns and then in the appropriate column, same row, showing how much is added/subtracted from that particular account.
   This leads to a very clean and easily understood array of cells that join a particular credit/debit (the row) to a particular account (the column).  
   Since each entry in an accounts column is dependent on the last balance for that account, anyone maintaining a spreadsheet has to constantly update the cell references to ensure each transaction is properly posted using the last previous balance of that particular account or column.  
   The function would have a single argument, the column to walk up.  The row would be assumed to be the row value of the cell calling the function.  It would walk up that column from the cell's row, subtracting 1 from the row each time until it found the last value of the account from the last transaction.  It then would return that value.  If an intervening row were inserted and a new transaction affecting that account were put in that new row, the next recalculate would deliver that new row value of that column.  
   In that way, the running value of that account is maintained, all the way down the spreadsheet regardless of changes made above.
   Enhancements for later might be to allow an argument using a different row or column.  But I think that is for later.   I will provide more visuals upon request.  I am going to work on a simple sample spreadsheet demonstrating the idea which I'll add as an attachment.
Comment 1 Terri 2012-01-29 09:03:16 UTC
Created attachment 56295 [details]
Shows formulas now and hints at what a walkup function would look like.

A walkup function could simplify this type of spreadsheet greatly, by allowing a pulldown copy of a canned formula at the top instead of manually tweaking all the cell references every time a row is deleted or inserted.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.