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

INT Function

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


Joined: 14 May 2009
Posts: 98
Location: Wanganui, New Zealand

PostPosted: Fri May 15, 2009 1:44 am    Post subject: INT Function Reply with quote

Hi,

I'm using the INT Function over 2 cells, ie. A1 contains a raw decimal figure while B1 contains the INT conversion.
I want to have the whole B column preformatted with the INT function awaiting the input of the raw data in the A column. I've done this but the only problem is that the preformatted cells display a "0" until data is entered into the adjacent cell. Is there a way to make those cells empty (or at least appear empty) until the raw data is entered?

Cheers,
Pete
Back to top
View user's profile Send private message Visit poster's website
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Fri May 15, 2009 1:51 am    Post subject: Reply with quote

You could simply use a database together with a query (a virtual table) where all calculated fields depend on existing entries. A spreadsheet has absolutely no concept of records, thus being a clumsy surrogate for a database.

You could handle your spreadsheet as a database-like list of entries (menu:Data>Define...) together with a macro of mine which inserts a new row into the currently used region and copies down existing formulas: http://user.services.openoffice.org/en/forum/viewtopic.php?f=21&t=2350
Download, extract to a suggested directory and assign 2 shortcuts.
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
Wheelz
Power User
Power User


Joined: 14 May 2009
Posts: 98
Location: Wanganui, New Zealand

PostPosted: Fri May 15, 2009 2:18 am    Post subject: Reply with quote

Thanks for the reply Villeroy, however I don't think I'm at that level yet, lol.
Not sure I understood the purpose or how to apply it to my situation. Not your fault, I'm still at junior school, haha.

This is my working spreadsheet. I've extended the INT column to show what I mean. Do you see your macro applying to it?

Pete
Back to top
View user's profile Send private message Visit poster's website
ken johnson
Super User
Super User


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

PostPosted: Fri May 15, 2009 3:14 am    Post subject: Reply with quote

=IF(C7="";"";INT(C7)) in D7 then fill down as far as needed will get rid of those 0s.

Ken Johnson
Back to top
View user's profile Send private message
David
Super User
Super User


Joined: 24 Oct 2003
Posts: 5668
Location: Canada

PostPosted: Fri May 15, 2009 5:32 am    Post subject: Re: INT Function Reply with quote

It is not "Preformatting", but is dependent upon a formula in each cell in column B.

=IF(A1="";"";int(A1))

Copy down column B.

Sorry, KEN got there first as I was typing.

David.
Back to top
View user's profile Send private message
Wheelz
Power User
Power User


Joined: 14 May 2009
Posts: 98
Location: Wanganui, New Zealand

PostPosted: Fri May 15, 2009 1:10 pm    Post subject: Reply with quote

Brilliant !!
Thanks guys. I'm sure this would be basic info I'd pick up if I managed to find a class at night school.
Appreciate your help.

Pete
Back to top
View user's profile Send private message Visit poster's website
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