Episode: 1485 Title: HPR1485: 26 - LibreOffice Calc Cells Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr1485/hpr1485.mp3 Transcribed: 2025-10-18 03:59:53 --- Do you? Yeah? Yeah? Hello, this is Ahuka, welcoming you to Hacker Public Radio for the next in our series on Libra Office and we're now taking a look at the spreadsheet program Calc. So, last time we took a look at some basic ideas of what is a spreadsheet and some of the things that we want to talk about, I'm going to start at the very, very beginning with this, with the fundamental unit of all spreadsheets and that is a cell. So what is a cell? Well, all spreadsheets have the same basic structure, a table of rows and columns. Columns are headed up A, B, C and so on. After Z or Z if you prefer, the next column would be A-A, then A-B, then A-C, A-D and so on. The maximum number is 1024, that's how many columns you can have in a Libra Office Calc spreadsheet. Now the rows are numbered 1, 2, 3 and so on and the maximum number of rows is 1024 times 1,024 or 1,048,576 possible rows. Now, at this time I'm not aware of any plans to increase these numbers, though that could change if competitive pressures make it necessary. I believe Excel, Microsoft spreadsheet program, recently went to 65,000 columns instead of 1024, which if you do your binary is just a few more powers of 2. But this is what the numbers are for now. Now where a row and a column intersect is a cell and a cell is given the address of the column followed by the row. So a cell might be A1, but never 1A, so that's the standard. And being able to name each of these cells is very useful because this, which is called a cell address, is something you can use in a calculation. So for instance, you have some number in cell B4 and you want to add that to another number that's in cell C3 and store it someplace in another cell, in other words, you would write equals B4 plus C3 in the cell where you want to store the sum. So learning to use cell addresses is extremely important, so get in the habit of doing this at every opportunity. Now when you understand cell addresses, you start to see that an interesting distinction arises between the contents of a cell and the result of a calculation. As an example, let us say that I have the number 4 in cell A3 and the number 5 in cell B3. I want to multiply these two numbers and store the results in cell C3. I would go to cell C3 and enter equals A3, asterisk B3, asterisk is of course the standard for multiplication. And when I do that, I would see in cell C3 the number 20. That's good. 5 times 4 definitely is 20. But is the number 20 actually the contents of cell C3? No, it isn't. The contents of cell C3 are equals A3 star B3. And if you tried to copy the cell to a different sheet thinking you were copying the number 20, you would quickly discover the problem. In the new sheet, the cell C3 would attempt to multiply whatever was in cells A3 and B3 of that sheet. If both cells were empty, you would get an answer of 0. They both had numbers. You'd get whatever these numbers multiplied out to. And if one of those cells had a word instead of a number, you'd get an error that reads hash V-A-L-U-E bang or explanation mark. Which is the general error message whenever you do a calculation that makes no sense. So for instance, if you did a calculation that involved dividing by 0, that's the error that you would get. As you probably know in mathematics, you are just not allowed to divide by 0. It's a forbidden operation. If anyone tries to say no, it's equal to infinity, you're wrong. It's a forbidden operation. And I'm sure my friend Charles and New Jersey will back me up on this because he is a mathematician. Now we know about cell addressing. The other thing that I want to cover in this particular lesson is cell formats. So the most common contents of a cell is numbers, but you could have other contents as well. In a financial application, you might want to present data by month or by quarter. And this probably means you're going to have cells that contain words, like the names of the month or the names of the quarters. And when you get into numbers, there are numbers and there are numbers. So let's take a look at the options available. Go to Format, Cells, and you will get a window that allows you to set the cell format property. Now take a look at the first tab, Numbers. And then down the left side, there is a column that has a number of categories. Let's take a look at these. The first one says all. Well, that means it's going to combine the results of all the other options, making for a long list to scroll through. I rarely use this since it's much faster to go directly to the category I want. Next one is User Defined. Chances are for you, this is empty right now since you probably have not defined anything, but it's good to know it's there if you need it. Number. This is for numbers in general. That you set the decimal places, whether you want to use a thousands separator. And if you want negative numbers to be read, just a few of the things you can do. Percent. Well, that formats the cell as a percent. And so if the result of your calculation was 0.85 in decimal, it would convert it to 85%. That can be handy in some circumstances. Currency. This lets you express your numbers as currency units and lets you add the currency designation automatically. Now, mine, of course, is in US dollars because I live in the United States. But if you would set your Libra Office localization for a different country, you'd probably see those currency units by default. In any case, the format dropdown gives you all the options if you need to make a manual change. One thing that comes to mind is you might live in one country but work for a company that's headquartered in a different country, and they want you to do financial reporting in the home country currency. So that would be a case where you'd want to do a manual change. Date. This gives you the date formats that are standard for your country. Now mine is the standard US month, followed by day, followed by year. But if you're in another country, you might see a different standard, such as the really more sensible day month year. Now you can manually change this. If you take a look at the bottom field, there's a thing called format code and you can go in there and change that to whatever you want it to be. In fact, when I'm naming files, there's probably an ISO number for this that I can't remember where it's year month day as simply an eight digit number, which I've always thought is the only sensible way to do that. This one is time. You can set the display of time values. Again, there's a format code field at the bottom, so you can make whatever adjustments you wish to make, depending on how you like to express time. Then there's scientific. This lets you use scientific notation. For instance, numbers that are expressed as a base and an exponent. And scientific notation, everything is done in base 10, usually. I think they tend to assume that, so three million would be three times ten to the sixth. I think that's right. And so on, so that would be scientific notation. Then there's fraction. This lets you display numbers as fractions instead of decimals. Now note that this only affects the display. The actual calculations are done using decimals. Normally, if you enter a fraction, it's converted to the decimal equivalent immediately and displayed that way. Now one thing about entering fractions is that, by default, the spreadsheet assumes that what you're entering is a date, because it's got that slash between the two numbers, and that's the same thing we used to separate dates. And that can cause endless amounts of trouble trying to figure that one out. Generally speaking, it just don't use fractions. Pain in the butt. Next one is Boolean value. Very simply, this gives you either true or false. You're going to see this come up when we get into the built-in functions that a spreadsheet has. And there are logical tests you can do on your data, and the result of those tests can come back as either true or false. You know, is the value in column C bigger than the value in column B? True or false? That's a logical test. Text. This lets you format the cell as text instead of a number. So this is one of those things that does come up, as I said, in my work as a project manager, I do use spreadsheets that have text data in them. Everyone does. And as long as you know what you're doing, there's no harm done. I've got a pretty good idea when I need to stop doing that and start doing a database. Now, what is a number? You probably thought you already knew the answer to this. It's obvious what a number is. Well, it's more subtle than most people realize. And the reason is numbers can be meaningfully used in calculations. That's one kind of thing, or they can be labels. We encounter this every day. For instance, if you want to call me on the phone, you would use my telephone number. In the United States, our social pension program, which is called Social Security, identifies each person by a Social Security number that is nine digits long. You may have a number for your automobile registration plate, an employee number at your job, and so on. In using spreadsheets and really in using databases, it is very important that you get an habit of treating these kinds of numbers as text, or you're liable to do something really stupid sometime. Like use it in a calculation. I'll take my Social Security number divide by three and then take the square root. I have no idea what that turns into. It's meaningless. It's stupid. Don't do it. Now, one of the ways people get into trouble with this is that spreadsheets are very often used as a way, and technically I shouldn't say just spreadsheets, there's something called a comma separated values text file, which is typically read by a spreadsheet program, but it doesn't have to be. But that is kind of a standard for moving data from one application to another. So CSV files are great ways of moving data around. And for instance, people will move data in and out of databases using these CSV files or other spreadsheet files. And this will start tripping you up if you haven't quite figured out exactly what it is you're doing in each of these. Is this an actual number or is it a label? If you get in the habit of treating those kinds of numbers as text, it'll save you. And the long run, a certain amount of grief. You have to remember, we have not yet perfected the telepathy interface. There is no way for the computer to read your mind and figure out what you meant. It really has to kind of just stick with whatever instructions you put in there. So the clearer you can be the better. Now, there are other format options there. Let's run through this. Other tabs on this properties window. So the first one is font. That's your standard font, chooser, same as you already know and writer. The idea of integrated suites is to do something once and reuse it everywhere. And so they do. Then the next one is font effects. Again, pretty much the same as in writer. Now in writer, I said these were things that very rarely would be used. They're even less rarely, more rarely, less often used in calc. All right, less is really more when you're dealing with this kind of stuff. If you don't have a good reason to do it, don't do it. The next tab is alignment. This is where you set the horizontal and vertical alignment of your cells. It also lets you change the way text flows. You know, instead of flowing horizontally, it could flow vertically or at an angle. It has a checkbox to wrap text. Now if the only thing you ever did in a spreadsheet was calculate with numbers, you might not even need most of these features. What the fact is that we do use spreadsheets for other purposes, like keeping lists. As a project manager, I create spreadsheets to manage issues or keep track of enhancement requests, for instance. And that's where this tab suddenly becomes very important. Next one is borders. Now generally, most people set this for the whole spreadsheet rather than on a cell by cell basis. You can set a format for a cell or a range of cells, separate from what you do for the entire spreadsheet. Let me give you one quick example. Suppose you have a column of numbers, and you want to add them up and put the total. Well, when I was taught how to do this in school with pencil and paper, it was you had a column of numbers, you drew a line under it, and then your total went under the line. Well, you can get the same effect in a spreadsheet if you take the last cell of that column of numbers and add a thick border at the bottom. Then you can put your cell, your sum in the cell underneath that. Background. Now, let's you use color backgrounds for a cell, or again for a range of cells, and can be very useful for improving the usability of a spreadsheet. Using the column descriptions, or headers, whatever you want to call them, the title of the column, a colored background makes them stand out. This obviously is going to work best if you have a color printer, since otherwise when you print, it gets converted to gray scale, and that's not quite as useful. Of course, if your spreadsheet will only be viewed electronically, not a problem. On a computer screen, you'll always have those colors. Full protection. Now, this requires that you have protection turned on for the spreadsheet as a whole, but it does let you lock down a cell or range of cells so that no one else can change or edit those cells. This is common in corporate environments where a spreadsheet might get widely distributed, for example, to submit expense reports, but you don't want people changing the structure of the spreadsheet in any way, you lock that down, and then they can't. Now, we've talked about these formats, and you apply it by simply selecting the cell, then opening the Format Cell Properties window and applying the format you want. Now you can do this to a group of cells by highlighting all of them, then opening the Format Cell Properties window and making your selections, and that lets you then apply it to all of the cells at once. So I think we've got a pretty good sense of some of the basics of how to work with cells. So I'm going to sign off. This is Ahuka for Hacker Public Radio, reminding all of you to support free software. Thank you. You have been listening to Hacker Public Radio, where Hacker Public Radio does our. We are a community podcast network that releases shows every weekday and Monday through Friday. Today's show, like all our shows, was contributed by a HPR listener like yourself. If you ever consider recording a podcast, then visit our website to find out how easy it really is. Hacker Public Radio was founded by the digital dog pound and the infonomicum computer globe. HPR is funded by the binary revolution at binref.com, all binref projects are proudly sponsored by LUNAR Pages. From shared hosting to custom private clouds, go to LUNARPages.com for all your hosting needs. Unless otherwise stasis, today's show is released under a creative commons, attribution, share