November 20, 2008

Making a Specific Template Come Up When You Create Any New Document, in OpenOffice.org Writer, Calc, Impress, or Draw (repost)

This is a very useful feature, I think, so I'm reposting it.

Anytime you can help people do something without actually have them do anything is great for them and great for you.

Templates are a great way to save time. Set up templates with the styles, graphics, etc. that people need, and they don't need to re-create them. (Or create them in the first place.)

However, getting users to use the templates is another step. For them, choosing File > New > Templates and Documents might not be something some will want to do or remember to do every time.

What if one of the templates you've created is one that many or all users use all the time as the basis for new documents?   You can make it come up when users just choose File > New > [type of document] by setting it as the default template. I.e. the user uses the template but doesn't even need to select it.

First, create a new document and make it how you want it: create styles, apply styles, include canned text, whatever.

Choose File > Templates > Save. Select a category and name the template. Click OK.

Saveastemplate_2

Choose File > Templates > Organize.

Open the category your template is in, in the left side.

Right-click on the template and choose Set as Default Template.
Templ6

Click Close. You're done! Choose File > New > [type of document] and you'll see the effect.

To switch back to the normal original boring blank document, repeat the steps but this time choose Reset Default Template > [type of document]

Templ7




October 16, 2008

Sharing Spreadsheets in OpenOffice.org 3.0

You can do it!

Here's what you need to do.

Choose Tools > Share Document.
Share1

In the window that appears, select the checkbox. Also note the highlighted portion of the text.

Share2

Click OK.

You'll see "sharing" in the title bar.

Share3

Repeat the previous steps to unshare. You'll see this message.

Share4

I don't have a network right now to test and get screen shots on but I tested it during a previous class with a network. Essentially updates of other people's tasks are displayed when you save. Sometimes before. And sometimes there is a lock from another person but only temporarily.

October 09, 2008

Updated the 10th: An Impress PDF presentation on OpenOffice.org 3.0 features

I created this presentation  for a client, about the 3.0 features in OpenOffice.org. I'm going to do a more detailed article but I thought I would post this since I've done it. Here's the solver.ods spreadsheet you can use to fiddle with.

I got pretty excited about some of them, especially the 3-up layout with lines already in there, and the far easier Impress handout printing.

3up

Printhandouts



And for those who like a good cross-reference, you don't need to create them first; you can just point to a heading in a list and select it, to make the cross-reference.

Cross1

Also very exciting is the PDF editing, which does some very Adobe Acrobat type things. It's in an extension you can get here.

In the words of Douglas Adams, share and enjoy!

October 02, 2008

Sorting mixed 5- and 9-digit zip codes in OpenOffice.org Calc or Microsoft Excel

Every advance leads to benefits and to problems.

The 9-digit zip code is great for delivery accuracy. But they aren't required. So you have mixed 5-digits and 9-digits.

Now just try sorting your address info by zip code when there's mixed 5s and 9s. Here's what you get when you sort a standard address list by zip code.  It's like cattle and sheep, they don't mix.

Zip1

What do you do?

There are three things you can do:
1 - Enforce a 9-digit zip. Everyone without four digits gets -0000 whether they want it or not.
2 - Put a ' in front of every zip code. It doesn't print but it forces the zip code to think of itself as text. (This also helps with not losing leading zeroes.)
3 - Split the column into two, so you have the zip in one column and the four-digit extension in the other. This is kind of like the forcing-9-digit solution.

The explanations follow but if you want to root around in an example spreadsheet, here's a spreadsheet with options 2 and 3.

Solution 1
Solution 1 is self-explanatory.

Solution 2
Just type a '   a regular apostrophe on the keyboard, to the left of the first character of every zip code. It doesn't show but it forces text format.

See? The ' is there in the entry field but it doesn't show in the spreadsheet cell.

Zip2

Typing ' into thousands of cells takes a while. So you can search and replace. There might be a better way to do this but this at least doesn't suck.

Click in the Zip Code heading in your spreadsheet, then  choose Edit > Find and Replace. Click More Options and fill out the window as shown, searching for ^0, caret zero, and replacing with '0, apostrophe zero.

You'll need to do this once for 0, then for 1, then for 2, and so on. (I've tried to figure out a faster way, plus submit any suggestions.) 

Zip3sr

Either replace one at a time if you're cautious, or go nuts and replace all. You might want to select the whole column of zip codes, too, and select the Current Selection Only checkbox.

When you're done, and when you sort that data, the zip codes sort correctly.

Zip4srresults

Solution 3

You can split your data into two cells with the LEFT and RIGHT functions. I'm throwing in IF too because sometimes you'll want the right-hand four digits (the extension) and sometimes you'll want 0000. (Or just leave it blank, whatever you want to do.)

This is what I want to achieve.

Zip5

And this is how I get it. The formula for the first column, where I extract the first five digits, is simple.

Zip6

The right-hand side is a little more complicated since you're dealing with variable-length zip codes. But basically you're saying if the zip code is just five digits, then create a new 4-digit extension, "-0000" (or just "0000" depending on how you want to deal with the dash). And then if it isn't just five digits, then you want to see the right-hand five digits of the zip code (including the dash) or the right-hand four digits (if you want to leave out the dash and put it in manually somehow).

Zip7

Then you just drag down those formulas to all the zip code cells.

If you want to turn those columns into normal text, just copy them, choose Edit > Paste Special, choose to NOT paste formulas, and click OK.
Zip8pastespecial

The pasted results are nothing but numbers.

Now when you sort, you just need to be sure to do it by two levels, first by the main zip code, then by the extension. BE SURE that you set the Ascending or Descending the same for both.
Zip9sort

And you get your results, sorted correctly.

Zip10

Here's a spreadsheet with options 2 and 3.

September 29, 2008

Cell formats, and using NOW() and other functions in OpenOffice Calc spreadsheets that you use in databases and mail merges

Mail merges work fine with spreadsheets as the data source. You create a spreadsheet of data, then choose File > New > Database, specify connecting to an existing database, Spreadsheet as the type, then click Next and point to the database itself.

Here are a couple things about formats, though.

Formats don't come through. So if you want your Salary field to have dollar signs, decimals, etc. you need to set the format. Likewise with date or time.

One way to do this is just set the formats when you view them. Press F4 and expand to view the query or table you want. Then just right-click on the column heading and choose Column Format.

Columnformat
Then in the window that appears you can select a category (Currency, Date, Number) and the the specific format you want. Click OK.

Datesetting

You can do the same thing in the database file itself. Open the .odb file, click the Tables or the Queries icon at the left, then double-click on the particular table (the sheet or query).

Edit

In the window that appears, right-click on the column heading, choose Column Format as before...

Datagain2

and in the window that appears, as before, make the choice you want. Click OK.

Datagain3

Now, here's a related topic. Can you use the =NOW() function in a spreadsheet and have it interpreted correctly in the database and in mail merges? (Thanks to a Colorado Springs LUG member for this idea.) The answer is Yes.

Here's a spreadsheet with =NOW() showing the absolutely current time and date.

Nowinspreadsheet

Here's what it looks like, with nothing done to it, in the database view. It needs some tender loving formatting since it's just showing the internal numeric value. Right-click on the column heading and choose Column Format.

Columnformat 

Set the format you want. The NOW() function can let you use a date or time format since it contains both.

Datagain3 

And now it looks fine in the database view.

Showdatainf4 

When I use this field in a mail merge....

Mailmmerge1

Here's the output when I format the field as a date:

Mailmergeoutput2 

and when I format it as a time.

Mailmerge3

September 22, 2008

How to create a series, or just repeat a cell, in OpenOffice Calc spreadsheets

Never retype when you can do it quicker!

In OpenOffice.org Calc spreadsheets, as in Excel, you can click on a cell, find the little black handle in the lower right corner, and drag it up, left, right, or down, to get additional content.


Ctrldraghandle 



If it's a number when you drag you'll increment by 1. If it's a value like the days of the week or names of months, it will increment as in January February March.


Ctrlrepeat 

If it's a formula where you've just typed it normally without absolute  references, then drag it down through a column or row, it will repeat the formula as shown. Here's the first cell with the formula:


 Ctrlcalc1 


Drag down and you get similar formulas referencing the next-door cell, not the original cell.

Ctrlcalc2

If it's anything else it will just repeat.

Ctrlbadger

If it's a number or day/week/month (not a formula) that usually increments, and you just want it to repeat, you can:

- Select the cell containing the number, as well as all the cells that you want it to repeat into, and choose Edit > Fill > down or right or whatever fits the cells you've selected
Ctrldrag_editfill

- Or you can hold down Ctrl when you drag and it'll do the same thing: repeat instead of incrementing. This works for incrementing months/days etc and numbers.

Ctrldrag


Note:
for formulas, if you want them to not adjust as you drag, you use absolute references as in Excel. $A$4 instead of A4 for instance.

August 21, 2008

Data Pilot (pivot table) tutorial for OpenOffice Calc

This PDF is from my Calc workbooks, and covers Data Pilots, Calc's version of pivot tables.

You'll also need this lab file.

See also this post.

Creating templates, and documents based on templates

This is a "classic" post but important and useful. See also info on styles .

Let's say you have the following:

  • A bunch of styles you need to have when you create a document.
  • Some canned text, like your signature or a graphic logo, that you use in a lot of documents
  • Or you just have to make sure that all your white papers or customer contracts or brochures follow certain formatting standards

You are an excellent candidate for using templates. Templates are documents that store styles, text, graphics, general formatting—whatever you want. You create a document, save it as a template in the Template Place, then point to that template when you want to create a new document using what it's got.

Making a Template

Open a new document.

Put in it what you want in the template. Styles, graphics, text of every kind and variety. Whatever.
Templ1

Then choose File > Templates > Save.

Specify My Templates unless you have another idea for a category.
Templ2

(To create a new category, click the Organizer button, select a category in the button that appears, right-click on it and choose New. An untitled category will appear. IMMEDIATELY start typing the name of your new category. Click somewhere else in the category list when you're done typing. Click Close.)

Type the name of your template like Meeting Minutes.
Templ3

Click OK.

Now you've got a template.

Using a Template

You need to create a new document using that template.

Choose File > New > Templates and Documents.

Select the Template icon on the left.
Templ4

Open the category you chose like My Templates. You'll see your template.
Templ5also

Click Open and you'll have a new untitled document based on that template.

The Coolest Part—Making That Template Come Up When You Create Any New Document

Choosing File > New > Templates and Documents is fine but what if that's your template you use all the time? You can make it come up when you just choose File > New > [type of document] by setting it as the default template.

Choose File > Templates > Organize.

Open the category your template is in, in the left side.

Right-click on the template and choose Set as Default Template.
Templ6

Click Close. You're done! Choose File > New > [type of document] and you'll see the effect.

To switch back to the normal original boring blank document, repeat the steps but this time choose Reset Default Template > [type of document]

Templ7

Pointing to an Existing Directory of Templates

If you have a bunch of templates, Microsoft or OpenOffice.org, set up OpenOffice.org to know where they are. Then you can get to them as above by choosing File > New > Templates and Documents.

Converting, If You Want to Point to Microsoft Format Templates
First, if they're in Microsoft format, you need to convert them to OpenOffice format. Choose File > Wizards > Document Converter. Follow the wizard through to create a converted set of copies of the templates.

Step 1.
Conveter1

Step 2, then just follow the wizard as prompted.
Converter2


Pointing to Templates to Use

Now, choose Tools > Options > OpenOffice.org > Paths. Select the Templates line.
Point1

Click Edit, then click Add, and add the path to the templates you want to point to. (Click this image to see a larger version if you like.)
Point3

Click OK, and OK, and OK  again.

Now you'll see the templates when you choose File > New > Templates and Documents.
Point5




August 07, 2008

Checking for broken links when you're using Edit > Paste Special, Link, in OpenOffice

Paste Special is a great feature. Copy something, then go to a different spreadsheet sheet, or a different OpenOffice.org, and choose Edit > Paste Special. (Or Ctrl Shift V.) You get these options.

If you're pasting a spreadsheet to a spreadsheet

P1

If you're pasting a spreadsheet to a text doc

P2

If you're pasting a text doc to a text doc, or a text doc to a spreadsheet


P3writertowriter 

If you select the Link option in spreadsheet-to-spreadsheet, or the DDE Link option when pasting any other time, you get a connection between the pasted from doc and the pasted into doc. When what you originally copied changes, then the pasted version of it changes, too.

Diagram

This continues to work unless somebody deletes, renames, or otherwise messes with the original file you copied.

Unfortunately, if this happens, there's no big red flag waving to tell you. The data is still there; the link is just lost.

Here's how to check to see if the link is still working. Choose Edit > Links.

If you see links listed there, they're working and nobody has messed up the name or location of the original file.

Editlinks

If the the Links option is dimmed, or if a link to the file you're checking on isn't listed, then the link is broken and you need to do Paste Special, Link again to make the pasted data update when the original data does.

August 04, 2008

The word completion-like feature in Openoffice.org Calc

I'm a big non-fan of word completion.
Auto

But when you go under Tools > AutoCorrect in Calc to turn off word completion in Calc, as you would in Writer, there's no Word Completion tab.

You need to choose Tools > Cell Contents > Autoinput to turn it off, or turn it on again later.

July 21, 2008

Using Vlookup() (or Hlookup()) in OpenOffice.org Calc spreadsheets, with a Data Validity dropdown list

For all you spreadsheet users: here's something kind of cool.

Let's say that you have a set of data. You have a list of items, and for every item that there is a unique item number, category number, and packaging type.

Or you have been getting your home entertainment organized and you have a perfect system for throwing parties: for every main dish there is a specific drink, appetizer, dessert, and game.

Having the data isn't the trick. What the data lets you do is that elsewhere in your spreadsheet, you can type or select the first item from a list, and have one or more of the other associated pieces of data pop into the cells next to it. You use =VLOOKUP() OR =HLOOKUP to do this.

Here's an example. I have this data. There are several columns but here are the first two.


V1

Here's one thing about the data. Be sure to sort it. Sort it by the first column, alphabetically or numerically. Select all the data, choose Data > Sort, and sort as usual.

At another spot in the spreadsheet I can set this up so that when I type "Beans and rice" in cell C19, the formula here.....


Formula

will automatically display the right type of drink for beans and rice (that I have set up in the data set).

V3 

How does the formula work?

($C19;$A$10:$D$15;2)

The first part $C19 (the $ is just an absolute reference) is the cell containing the value that I want to look for in the FIRST column in the data set. In case the type of food such as beans and rice.

The second part is the range of data.

The third part is the column containing the data I want. I type 2 for the drink; 3 if I want to display the column containing appetizer information.

Annotated

You can keep on going by adding more columns. Use the same formula but set it up so that the last argument (the column) is 3, 4, and 5 respectively.


Allformulas 

and that's how this looks.

Alll2

If you're thinking that typing the names of the dishes is a lot of work, especially if instead of six main dishes you had 122 part names or numbers, you're right. Ideally you'd set up a dropdown list.

Click in the cell where you want to display the first piece of data, the main dish. (You probably wouldn't make the lists and VLOOKUP positioned right next to the original data set; I'm just showing them side by side because it's simpler, and it's frankly easier to get screen shots this way. ;> )

1. Choose Data > Validity.

2. From the type list select Cell Range, then type an absolute range (with $row$column format) as shown, around the column of labels.


All3 

2. Click OK.

Then click the little tiny black handle in the lower right corner of that cell where you made the list, and drag it down to put in a list in other cells too.

All4

Now you can just select something from the list, and all the corresponding info, from the data set, will appear in the cells where you've also put the VLOOKUP formula.

All5

(HLOOKUP is the same, but rotated 90 degrees.)

July 14, 2008

If you use Linux, you MUST try gLabels

Download it now, use it now.

http://glabels.sourceforge.net/

This is a beautiful program, a well-balanced combination of power, simplicity, good design, and ease of use. Thanks to Keith for pointing it out to me.

There's no Windows or Mac version, sadly.

Among the things you can do are:
- automatically (no effort on your party) suppress empty address lines
- do bar codes
- point straight to a CSV or similar format file to bring in records
- deselect records you don't want to print
- add graphics and drawing shapes
- apply formatting
- easily preview the whole sheet

Here's a screen shot with a summary of what you do. I'll do more detailed instructions later but here's the quick info. I love it.

Glabelscallouts  

July 03, 2008

OpenOffice Calc spreadsheet settings for how a cell is filled

When it comes to cells, I like my content to look either like the first cell, or the second cell. If there's enough room for all the content; great. If there isn't, I like a nice wrap.

Twoselections

To wrap content in a cell, select the cell or cells then choose Format > Cells, Alignment tab, and select Wrap Text Automatically.

Wraptextautomatically

If you've got just barely not enough room, you can also move your mouse over the right-hand border of the cell's COLUMN separator, and when it looks like this, double-click. Bam, the whole column will be just barely as wide as the widest cell in the column.

Doubleclick_2

Here are a couple other options that I just started looking at. Shrink to Fit Cell Size, and for the horizontal justification, Filled. You get to them the same way you get to the wrap option: select the cell or cells then choose Format > Cells, Alignment tab, and select the options you want.

Options

Here's how each option looks. The demo content is in plain text and the explanation is in caps to the right of the relevant cell. Frankly I'm not sure how much I would use the Filled justification; seems a little dangerous.

Shrinktofitexplanation_2


Traininglogo




June 23, 2008

Creating your own order to sort with: leaving alphanumeric in the dust

I've been blogging about sorting for a while:

There's just one more thing to mention: creating your own custom sort order.

Existing sort orders are things like Monday Tuesday Wednesday (the right order, which is not alphabetical). But let's say you've got things you want in a certain logical but non-alphabetical order that aren't already set up in OpenOffice.org: titles of books or people, procedures done in a certain order, or your own abbreviations for the days of the week. You can create sort orders for those very easily so you can sort by them.

Let's say you've got this data.

So1

This is the right order. If you had them out of order, though, and wanted to sort them, all you'd have the option for is alphabetic. Which isn't right. So you create an order to sort them by.

Select just the content of the sort order, nothing else. Be sure it's in the order you want it.
So2

Choose Tools > Options > OpenOffice.org  Calc > Sort Lists.

So3

Now just click Copy.

The list will appear. Click OK.
So4

Now just sort the way you would with a custom sort order. You'll see your new sort order in the sort window.
So_c

Sort orders are nice for quick data entry, too. If you type the first word for a sort order, then find the small black handle in the lower right corner of the cell and drag, you'll be able to easily fill the cells with the rest of the content in the sort order.

Type the first word

Drag0


Find the black handle and drag (magnified to show the handle)

Drag1

The data will fill in each cell you drag through, in the order set up in the sort list.

Drag2

June 09, 2008

Making changes to an OpenOffice.org chart in Draw

Thanks to Brian from Howard County Library for pointing this out to me.

Let's say you've got a chart, and it's fine, but you're just not that jazzed about how it looks. You'd like a more Graphic Designer look to it. Here's how to break it down and do whatever you want to it.

You've got this data; great new data on the number of users that use open source computers at the library branches.

Draw1

And you make a basic bar chart, or whatever kind of chart.

Draw2thegraph

And you can do some things. Double-click the chart, click on the element you want to delete, and press Delete.

Draw3


You can also right-click on things like the background, choose Object Properties, and choose Invisible instead of a line and click OK. 

Draw4

Then the lines don't show. (You could also re-create the chart without the lines.)

Another option, for adding text boxes, is choose View > Toolbars > Drawing. Click the T text box tool and draw a text box near the chart and type immediately. Then drag the text box over the chart.

Text

But here's the thing you can do in Draw. Copy the chart; just click on it once and copy it. Then choose File > New > Drawing and paste it into the main slide work area.

Right-click on the chart and choose Break.

Draw7break


And now you can click on any particular part and just delete it or reformat it.

Draw8  


You could get to something like this.
Draw9

June 02, 2008

TechTarget Article: Using Master Documents in OpenOffice Writer

I've written an article for TechTarget.com about using master documents in OpenOffice.org Writer.

http://searchopensource.techtarget.com/tip/0,289483,sid39_gci1230368,00.html

Master documents are used to combine lots of other Writer documents. They're similar to Word master files or Frame book files in that they organize your subdocuments, let you create a unified table of contents, etc.  They're a bit picky but once you've got them set up, they work quite reliably.

I've also written an article for TechTarget.com about how to bring spreadsheets into master documents, too. You link the spreadsheet to a Writer document, then bring that "dummy" writer document into your master document. It's a hack but a practical hack since big publications often need to combine different document types. There's an approach (even hackier, but useful) for bringing in presentation content, too.


Traininglogo




May 20, 2008

Getting the contents of a table or query into an OpenOffice.org Calc spreadsheet

For the longest time, the really easy way of bringing database content into a document didn't work in Calc spreadsheets. At least, not for me. But now in 2.4 it does. So here you go. It's the same approach you use in Writer, just a little more limited.

Choose View > Data sources or  press F4.

Expand the DB you want, then the table or query you want. Select the table or query name.

Click on the upper left corner as shown, the un-obvious little gray square.
Firstview  

Click and hold down and drag into the document. And you'll get your data.

Fullview


Traininglogo

May 12, 2008

Copying only the unique values from a set of cells in OpenOffice.org Calc spreadsheets

So there you are. You've got a whole bunch of people signed up for various events you're planning. Or they've ordered a bunch of your products. Some have signed up for more than one event; some have ordered more than one product.  You want to just get a list of the customers who've signed up. If a customer has signed up for three events, you just want her name to appear once. You just want the unique values.

Un1

One thing you can do is use the Standard Filter.

Select the column of data, either with the heading or without.

Un2


Choose Data > Filter > Standard Filter.

Un3

Select None as the Field Name then click More.

  • If you didn't select a column heading like Customer, deselect Range Contains Column Labels.
  • Select No Duplication
  • Select Copy Results To, click in the empty field, then either type the sheet and cell where you want it copied, or click in the cell in your spreadsheet where you want it copied.

Un_thewindow2

Click OK.

You'll get only the unique values from that cell range, pasted starting at the cell you specified.

Un5_2


Traininglogo




April 21, 2008

Sorting data in OpenOffice.org Calc (repost)

You want to do some good, hard sorting. Not just sorting by the first column, but by perhaps the third column. Maybe you want to sort first by state, then by city, then by last name. For that, you need the Sort window under Data > Sort.

You have your data.  Select all the data to sort, and either select the headings or not. You're good either way.
Sortmenu1

Choose Data > Sort.

Click the Options tab. You need to tell Calc whether you've got headings selected or not. If you've got headings selected, you want the option shown, "Range Contains Column Labels," to be selected. If you didn't, unmark it.
Sortmenu2optiostab

Now click the Sort Criteria tab. If you selected headings you'll see the headings themselves; if you didn't then you'll just see Column A, etc. Select the column to sort by, and Ascending or Descending.
Sortmenu3

Click OK.

You get your results. Here, the amounts under the column for the year 2000 are sorted in ascending order.
Sortmenu4

Now, let's look at a different set of data. You have a lot of people from the same state, and several cities per state. In this case you might want to just sort by last name, but you could also group by location. So you'd sort by state (the broadest category), then city, then alphabetically by last name. Click the image to see more detail.
Layer1

Select the data, with or without headings, and choose Data > Sort. In the Options tab, be sure to select the Range Contains Column Labels option if you selected headings.

In the Sort Criteria tab, select first State, then City, then Last Name.
Layer2

Click OK.

You get your results. Here's a closeup of one section, followed by the complete data. Click either to see them closeup.
Layercloseup

Layer3

This window that I've covered in this blog entry is pretty much what you need. If you want to go a little farther and sort by something else, like days of the week in the order they come, not alphabetical order, tune in for the next sorting blog.


Traininglogo




April 14, 2008

Un-displaying the grid lines in OpenOffice.org Calc

Tired of those pesky gridlines being displayed onscreen? Here's how to turn them off.

Thanks to Marek for pointing this out -- I like to consider myself the queen of "it's under tools > options" but I only looked under the View menu before resorting to hack measures.

Choose Tools > Options > Calc, View. Deselect Grid Lines. You can change the color of the grid lines here, too.


Viewgridlines

Note that by default, they don't print. To make them print, choose Format > Page, Sheet tab.

Printgridlines


Traininglogo




April 10, 2008

Creating a dropdown list in OpenOffice Calc that references a list of values (repost)

I just started using feature this recently, for my LinuxWorld presentation. It's very nice. Anytime you can reference some text, rather than embedding it in the formatting, it's good.

List2referring_2

Some background: under Data > Validity, you can control what people can enter in spreadsheets, and offer them help in the form of lists, help tips, etc.
Validitywindow

I wrote about the Validity tools here

http://openoffice.blogs.com/openoffice/2007/01/openofficeorg_c.html

and elsewhere on my blogs. However, what I haven't talked about yet is how to make a dynamic list.

Let's say you've got a spreadsheet documenting the year's performance for the 120 people in your company, one sheet for each person. They're summarizing what they've done this year, and you want them to list the projects they've worked on. You would like to list the Official projects rather than having them type in whatever. So you want a dropdown list. Howeve, you don't want to have those projects typed in that dropdown list because then if you change it, or use this spreadsheet next year, you'll have to correct the list 120 times. (You can copy and paste, but still.)

So you make a list of the projects that references a cell range in a sheet called Projects, say, and all you need to do is update that one cell range to make all the lists update.

List1

Here's how you do it.

1. Click in the cell where you want the list to appear. If you want the list in multiple cells, select multiple cells.

2. Choose Data > Validity.

3. Select Cell Range in the list.

4. Type the range. To type a range in the same sheet , type something like this:

$F$1:$F$20

You need the $ to make the reference absolute.

If the range is in a different sheet, add the absolute sheet reference in front, like this.

$Projects.$F$1:$F$20

5. Click OK.

Then if you need to, just change the contents of the cell range and the list updates. Previous entries in those spreadsheets containing entries no longer in the list do not change.


Traininglogo




April 03, 2008

Using Names to have a more readable reference to items in formulas

Who doesn't love a formula like this?

=(E18*F25)/((AVERAGE(C23:C20)) + SUM(D18:D29))

Now, the math is fairly complex and I just made it up to look extra complex, but just looking at it, you're not sure what it's referring to.

If you used names, which let you give more clear, descriptive names to parts of your spreadsheet, it could look like this.

=(TotalSales*TotalMonths) / ((AVERAGE(2006Sales)) + SUM(SalesBonus))

Ahh.....that's a little clearer. (Since it's a random made-up example, it might not make total sense from a business standpoint, but you're at least in the ballpark now.)

That's all very well, but how to do you add the names?

You can assign any name you want by selecting one or more cells and choosing Insert > Names > Define.
Names2insertnamedefine

 

Type the name, click Add, and click OK.
Names3dedfinname

Then you can create formulas like this.

Names7b

Note that you can't do this:
=Ement+Admit

because those names refer to ranges. You can't do  =Ement+Admit because you can't do =B17:B20+E17:E20

You'd need to create more names to refer to just the totals. You'd create another name for the total field where the =SUM(Ement) total is, so that then you can type =TotEment+TotAdmit  (total Entertainment Expenses plus Total Admission Expenses).

 

There's a quicker way to get all your columns named. Let's say you've got this data.

Taxes

Select all the data and choose Insert > Names > Create. In this case it makes sense to select the checkmarks for top row and left column since that's where the labels are. Then click OK.

Aname1

To look at the names created, choose Insert > Names > Define.
Aname2

Now you can create totals, for instance, like this. Note that when you're in a formula and you start to type a name, it will appear in the Formula field as Prepaid_Taxes does here. Press Enter to accept it so you don't have to type the whole name.

Aname3

As mentioned before, you'll probably want to make fields to just refer to the totals. Select the cell and choose Insert > Names > Define. Type the name, click Add, and click OK.

Anames4

And then you can do something like this for the formula. (Yes, you might do a SUM(range) for this but let's say that you've got all these amounts, Bus exp and Salary etc all over on different sheets or farther apart, so you would have to do the + instead. )

Anames5

and get a result.

Anames6total

Tip: If you want some visual help figuring out where all those names come from, now that you don't have the cell references, you can choose Tools > Detective > Trace Precedents.

Caveat2