Episode: 1505
Title: HPR1505: 28 - LibreOffice Calc - Fills, an Introduction
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr1505/hpr1505.mp3
Transcribed: 2025-10-18 04:21:56

---

Okay.
Hello, this is Ahuka, welcoming you to Hacker Public Radio for another in our ongoing
series on LibreOffice, focusing on Calc.
Now, we're spending a lot of time building some fundamental tools in our toolkit here.
And so, you may not be thinking this is a ton of fun, but it's important that we get
the basics, the fundamentals, correct before we move on to all the sexy business, assuming
anything about spreadsheets, qualifies as sexy business.
Now, one of the key techniques in using a spreadsheet is to master the art of fills.
Now, let you fill a column or a row with data without having to type in every cell individually.
And this technique requires that there be a predictable pattern to the contents of each
cell as you fill them.
And you can do a lot with this technique, and we will want to use this when we do our
first model, which will be a simple savings model.
But first, we need to build the tools, and fills are a big one.
To begin with, you can fill either rows or columns, though columns are more frequently
filled using this technique.
Still, it's good to know you can do either.
The simplest fill begins with a cell that has some kind of contents.
For example, let's say that cell B1 contains the word rain.
If you click on the cell, you will see it highlighted with a thick black border.
But if you look closer, there is also a small black square on the lower right corner of the
cell, and this is the fill handle.
If you move your cursor over this handle, it will turn into a plus sign.
At this point, you can click and drag to fill cells in the column or row.
In this case, because the contents are text, it will simply repeat the text.
So if you click and drag down column B, you will see cell B1 has rain.
Cell B2 has rain.
Cell B3 has rain, and so on as far as you happen to click and drag.
You can do the same thing to fill row.
You just take the fill handle and you drag it horizontally instead of vertically.
So in this case, you might see B1 has rain, C1 has rain, D1 has rain, and so on.
You may be looking at this and thinking, no big deal.
How often would anyone want to fill a bunch of cells with a single word?
And perhaps that isn't something you would do all the time, but this is only the beginning.
What if we use a number?
So I'll go back to cell B1 and put in the number 1, and then click and drag to fill the column.
Aha, now we're getting somewhere, because as I click and drag cell B1 down to fill the column,
it's incrementing each cell by 1 to give me successive numbers.
So I have in B1, I've got the number 1, in B2, I have the number 2, in B3, I have the
number 3, and so on.
Also as I do it, if I'm paying attention, I notice there's a little black square that
travels with my cursor and shows me the latest number I am inserting.
This is handy if you wanted to know where to stop.
As I said before, I can also fill a row with the same technique.
But what if you don't want to start with one?
What if you want to start with, oh, 42?
No problem.
You just enter 42, and when you fill the column, you'll get the numbers 43, 44, 45, and so
on.
Ah, but you have more sophisticated needs.
You want to increment by some other amount.
Let's say you want to go up by two each time.
Well you can do that, but you have to give Calc enough information to figure it out.
Remember, we still do not have the telep at the interface.
So the way you do this is to type the first two numbers into successive cells.
Then click on the first cell to select it, then hold down the shift key while you click
the second cell.
This should now show two cells selected.
And here we can see that the first cell has the heavy black border, but the fill handle
is now on the second cell, and both of them are highlighted.
Now if you click and drag down through the column, the numbers will go up by two each
time.
Again, you can do the same thing with rows.
You just have to have the two cells adjacent to each other on a single row, but the same
technique works fine.
If you combine numbers and words, Calc will increment the numbers, but keep the words constant.
For example, if you enter year one in the first cell, and then fill the rest of the column
or row, you will get year two, year three, and so on.
This is very useful if you want to increment the numbers, but sometimes you don't, and
you can get frustrated.
Well in this case, you need to find a way to tell Calc not to do this, and the way you
do that is to hold down the control key as you fill the row or column.
Enter year one in the first cell, then hold down the control key while you fill, and
each other cell will also say year one, year one, year one.
Now, next thing you might want to try, what happens if you enter January in the first
cell and then fill your row or column?
You'll discover that Calc will continue to fill with February, March, April, and so on.
Same thing if you started with Monday, that'll get you Tuesday, Wednesday, et cetera.
These are examples of lists, and Calc comes with a number of these built in.
So where do you find them?
You go to the Tools menu, Options, Libra Office Calc, Sort lists, and this will open
up a window, and out of the box chances are you're going to see about six of these lists.
You've got all of the months, both in full written out January, February, and abbreviations
Jan Feb.
Then you've got the same thing for days of the week, either fully written out or abbreviated.
And then the last two are lists that represent Jewish names for days and months.
Now you might look at this and say, hey, that doesn't cover my situation.
Well, not a problem.
Suppose you want to add your own list, just click the new button and start typing it in.
Or if you already have this list in a range of cells on the spreadsheet, you can copy
the list in by giving it the range of cells to read.
As an example of where this might be handy, imagine a company that has 10 sales regions
and frequently wants to report results from all 10 on a spreadsheet.
Click the list once, then you can fill a row or a column anytime you need it.
Now filling with cell addresses, this is something you will do a lot in Calc, as it is a very
powerful part of building a model.
Suppose you enter the cell address equals A3 in a cell.
That tells Calc to copy the contents of cell A3 and place them in this cell.
By the way, if you left out the equal sign, all you would get is the string A3.
And if you filled a row or a column from here, you would get A4, A5, etc.
But if you did this properly with the equal sign, you would get different results.
So let's say you have a column in the first cell says equals A3 and then you click and
drag to fill the column, you would get equals A4, equals A5, etc.
Each cell would pull the contents of another cell from column A.
But if you begin with equals A3 and fill a row, something very different happens, then
you would successively get equals B3, equals C3, equals D3, and so on.
Calc knows that the letter at the beginning of the cell address denotes the column and
that if you are filling a row, you must want to increment the column designator.
Now this also works with more complicated formulas.
Suppose you begin with the formula equals A3 plus B2.
If you fill a column, you would then get equals A4 plus B3, equals A5 plus B4, and so on.
But if you fill a row, you would get equals B3 plus C2, equals C3 plus D2, and so on
across the row.
And no matter how complicated you make it, you can fill a row or a column and it will
always increment the number when filling a column and increment the letter when filling
a row.
This is great when you want the row number or column letter to increment.
But what if you want to keep one or both of them constant?
Then you need to place a dollar sign in front of the one you want to hold constant.
Suppose you wanted to keep the address of cell A3 constant while letting the other cell
address increment.
If you entered the formula equals A dollar sign 3 plus B2, you can fill the column.
And each cell will have the formula equals A dollar sign 3 plus B3, equals A dollar sign
3 plus B4, and so on.
So that B cell number is going to increment as you go down and fill.
But if you started with equals A dollar sign 3 plus B2 and then fill the row, what happens?
And then you would get equals B dollar sign 3 plus C2 equals C dollar sign 3 plus D2 and
so on.
What happens is that you set the row address of 3 is a constant, but not the column address.
You can set the column address as a constant by putting the dollar sign in front of the column
letter.
And then what you would do is type equals dollar sign A3 plus B2.
Now if you fill the column, the number will go up, but when you fill the row, the column
stays on A.
And if you combine them, then you're going to use cell A3 no matter what.
So you would just write that as equals dollar sign A dollar sign 3 plus B2.
Now no matter whether you fill a row or a column, the first term in the formula will not
change.
There's a place for each of these ways of locking down addresses, so get used to using
all of them.
Now, you are not limited to only filling one row or column at a time.
You can fill multiple rows or columns, so long as they are contiguous.
For example, I want to fill the columns A, B and C based on what I put in the first row.
Then I would click on cell A1, hold down my shift key, and click on cell C1.
I would see all three cells highlighted.
Cell A1 would have the heavy black border, and cell C1 would have the fill handle.
If I click and drag on the fill handle, I can fill all three columns at once.
And if I want to have any or all columns increment by some amount other than one, I can
fill in the first two rows, click on cell A1, then hold down the shift key, click on
cell C2, and now I have highlighted a rectangular block of six cells.
I can now click and drag to fill all three columns and increment each column any way
I want.
So there's more things you can do, but the further use of the fill techniques is a little
more advanced, so we'll leave that for some other time.
This is enough to get us going.
So this is Ahuka for Hacker Public Radio signing off and as always reminding you, please
support free software.
Thank you.
You have been listening to Hacker Public Radio at Hacker Public Radio.
We are a community podcast network that releases shows every weekday 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 Dark Pound and the Infonomicom Computer
Club.
HPR is funded by the Binary Revolution at binref.com.
All binref projects are crowd- Exponsored by Lina Pages.
From shared hosting to custom private clouds, go to LinaPages.com for all your hosting needs.
Unless otherwise stasis, today's show is released under a Creative Commons, Attribution,
