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

SOLVED how to refer to a cell? (thanks ken)

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


Joined: 27 Jul 2011
Posts: 2

PostPosted: Wed Jul 27, 2011 6:31 am    Post subject: SOLVED how to refer to a cell? (thanks ken) Reply with quote

In calc how do I refer to a cell? Not the content of the cell but the cell itself. If I have a formula and refer to a cell but then insert a new row or column the reference changes to reflect the new position of the information instead of what I set it at.

=A1
insert new row in row A
now becomes =B1
I want it to constantly say A1 and not change no matter what I do to the spreadsheet.

I tried naming the cell (no luck)
and I tried absolute cell references ($A$1) (no luck)

Sorry if this is a really stupidly simple question. TIA of a reply. Smile


Last edited by jonthebon on Fri Jul 29, 2011 1:34 am; edited 1 time in total
Back to top
View user's profile Send private message
RickRandom
Super User
Super User


Joined: 27 Jan 2006
Posts: 1082
Location: UK

PostPosted: Wed Jul 27, 2011 9:34 am    Post subject: Reply with quote

When you insert a new row, it pushes the cell and its contents you have previously referred to down, so the spreadsheet alters the reference so that it keeps referring to the same contents.

I have used spreadsheets for over 20 years, and this is how they all work. I have not noticed a way to alter this behaviour, but then I haven't looked much, as it is what I expect and want.
Back to top
View user's profile Send private message
ken johnson
Super User
Super User


Joined: 23 Apr 2009
Posts: 2032
Location: Sydney, Australia

PostPosted: Wed Jul 27, 2011 3:04 pm    Post subject: Re: how to refer to a cell? Reply with quote

jonthebon wrote:
=A1
insert new row in row A
now becomes =B1
I want it to constantly say A1 and not change no matter what I do to the spreadsheet

I think you have confused the terms "row" and "column". "A" is a column label and you would need to insert a new column at column A for =A1 to update to =B1.

A way of preventing the update is to use the INDIRECT function...
Code:
=INDIRECT("A1")
in B1 returns the contents of A1.
After inserting a new column at column A, INDIRECT's parameter, the string "A1", does not update to "B1" because it is a string, not a range reference The INDIRECT function converts a string, in this case "A1", into a range reference, in this case a reference to the cell A1.

Ken Johnson
_________________
If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button).
Back to top
View user's profile Send private message
jonthebon
Newbie
Newbie


Joined: 27 Jul 2011
Posts: 2

PostPosted: Thu Jul 28, 2011 4:01 am    Post subject: Reply with quote

Ha ha, I did confuse row with column. I was at the very end of the work day after spending the entirety of it on this spreadsheet.
Thank you so much ken, this is exactly what I was looking for! You saved my arse from my boss! Thanks again!
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