OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Simple Function

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
Tasoli
Newbie
Newbie


Joined: 11 Feb 2009
Posts: 1

PostPosted: Wed Feb 11, 2009 4:26 pm    Post subject: Simple Function Reply with quote

I'm trying to write what should be a simple function, but I don't have the knowledge to write it. I've discovered the =SUM command, but I'm not able to figure out how to combine enough commands to do what I'm trying to do. Here's what I'm trying to do:

Column A will have a name, column B will have a total of all columns from C to infinity. Here's the tricky part, I need Column B to have a sum equation that uses a row VARIABLE to determine what's being added, something like =SUM(C'%row'Very Happy'%row') or what have you, where '%row' is a real command. That's one of the parts I can't quite figure out. In addition, I need to write another variable that adds up the two cells above itself. So, if I place this variable in any cell, it will just add the numbers in the two cells above it together, but not need a specified row and column number to fetch the data from.

Make sense?
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Wed Feb 11, 2009 11:15 pm    Post subject: Reply with quote

OFFSET(start_reference ; rows_offset ; cols_offset ; resize_rows ; resize_cols)
http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Calc:_OFFSET_function

For instance:
OFFSET($A$1 ; 1 ; 2 ; 3 ; 4)
returns a reference to A1, 1 down, 2 to right, 3 rows tall, 4 columns wide => C2:F4

resize_rows and cols_offset can be negative as long as you stay within the bounds of the sheet.
resize_rows and resize_cols have to be positive.
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group