| View previous topic :: View next topic |
| Author |
Message |
Wheelz Power User


Joined: 14 May 2009 Posts: 93 Location: Wanganui, New Zealand
|
Posted: Fri May 15, 2009 1:44 am Post subject: INT Function |
|
|
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 |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Fri May 15, 2009 1:51 am Post subject: |
|
|
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 http://forum.openoffice.org |
|
| Back to top |
|
 |
Wheelz Power User


Joined: 14 May 2009 Posts: 93 Location: Wanganui, New Zealand
|
Posted: Fri May 15, 2009 2:18 am Post subject: |
|
|
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 |
|
 |
ken johnson Super User

Joined: 23 Apr 2009 Posts: 1845 Location: Sydney, Australia
|
Posted: Fri May 15, 2009 3:14 am Post subject: |
|
|
=IF(C7="";"";INT(C7)) in D7 then fill down as far as needed will get rid of those 0s.
Ken Johnson |
|
| Back to top |
|
 |
David Super User


Joined: 24 Oct 2003 Posts: 5668 Location: Canada
|
Posted: Fri May 15, 2009 5:32 am Post subject: Re: INT Function |
|
|
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 |
|
 |
Wheelz Power User


Joined: 14 May 2009 Posts: 93 Location: Wanganui, New Zealand
|
Posted: Fri May 15, 2009 1:10 pm Post subject: |
|
|
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 |
|
 |
|