- •Basic Functions : fixed
- •Paste Special II - Removing formulae
- •Secret StarWars games
- •Using Names as constants
- •Listing Cell Notes
- •Basic functions: choose
- •Checkerboard shading
- •Using Pop Up Notes in Cells
- •Macros: Text Utilities Part I
- •Adding a dialog: Part I
- •Adding a dialog: Part II
- •Formatting ratios
- •Filling a multiplication chart
- •Macros: Text Utilities Part I
- •Summing across sheets
- •Counting unique entries in a range
- •Spelling out numbers
- •Datapilot Revisited
- •DataPilot Revisited II
- •Basic functions: text
- •Ranking and sorting data I
- •Conditional summation revisited
- •Regression analysis I : Basic linear formulas
- •Regression Analysis II : Basic functions, charting
- •Regression Analysis III : linest
- •Rounding to the nearest nickel: mround()
- •Looking up data in tables V
- •Combining data in cells
- •Rounding functions I
- •Easter formula
- •Date & Time : Calculating Dates of Holidays
- •Financial Functions 3 : Complex Accumulation
- •Data Consolidation 101
- •Basic Functions: frequency
- •Largest values in an array
- •Advanced Functions: indirect
- •Counting letters in a string
- •Macro : Sorting sheets
- •Basic functions : subtotal
- •Filling a Cell Range with a Series
- •Converting text to dates
- •Basic Functions : cell
- •Rounding Numbers to Thousands and Millions
- •Text manipulation 1 : Concatenation
- •Copying Formulas while preserving references
- •Sumproduct and conditional summation
- •Custom Time Formatting for a timesheet
- •Data Validation 101
- •Basic functions : sumif
- •Adding a background graphic
- •Introduction to the Status Bar » Using the Navigator
- •Introduction to the Status Bar
- •Charting: Editing charts : part 2
- •Charting: Editing charts : part 3
- •Autocorrect
- •Macros: Getting Cell Information
- •Charting: Pie charts
- •One Response to “Charting: Pie charts”
- •Basic Functions: iserr
- •Database functions: daverage
Basic functions: choose
September 13th, 2005
The CHOOSE function comes in handy when there are a number of options for a particular value based on the result of an expression or result. It saves having to construct a complex formula involving nested-ifs.
In the example below, the CHOOSE function is used to select the text form for the day of the week - according to the numerical value returned by the WEEKDAY function
Posted in Function Tips | No Comments »
Checkerboard shading
September 12th, 2005
A checkerboard shading effect is easily achieved with conditional formatting as shown below. The conditional formatting dialog is invoked with Format - Conditional Formatting
Please review earlier articles on conditional formatting here , here andhere.
When the condition (formula) evaluates to true, then the specified style is applied to the cell. We have seen this before. ISODD is a boolean function so is ideal in this situation.
The resulting pattern…
Posted in Using OpenOffice Calc | No Comments »
Using Pop Up Notes in Cells
September 10th, 2005
You can annotate your spreadsheet with pop-up notes attached to any cell you wish. The data validation function is invoked as shown below..
Choose the Input Help tab and enter the desired annotation for the selected cell.
This is what will be displayed each time you select the cell.
Posted in Using OpenOffice Calc | No Comments »
August 29, 2005
Macros: Text Utilities Part I
It is straightforward to enhance the capabilities of OOo Calc with your home grown functions and features. In this tip, we add the ability to change the case of the text in a range of selected cells.(UPPER CASE, lower case or Proper Case). As you can in the screenshot below, we have added a new top level menu item TextUtils with 3 new functions, UpperC, LowerC, and ProperC. The last function capitalizes the first character only. We could have invoked these functions with Tools - Macros etc but from a user's standpoint, it is much more convenient to invoke them the way we have implemented it.
Pretty straightforward - the results of applying UpperC to the selected cells.
First - the source code...
Sub UpperC oDesktop = createUnoService("com.sun.star.frame.Desktop") oDocument = ThisComponent oSelectedCells = oDocument.CurrentSelection oActiveCells = oSelectedCells.RangeAddress oSheets = oDocument.Sheets oSheet = oSheets.getByIndex(oActiveCells.Sheet) ' active table For nRow = oActiveCells.StartRow To oActiveCells.EndRow For nCol = oActiveCells.StartColumn To oActiveCells.EndColumn oCell = oSheet.getCellByPosition(nCol,nRow) CellVal = oCell.getString() oCell.setString(UCase(CellVal)) Next Next End Sub Sub LowerC oDesktop = createUnoService("com.sun.star.frame.Desktop") oDocument = ThisComponent oSelectedCells = oDocument.CurrentSelection oActiveCells = oSelectedCells.RangeAddress oSheets = oDocument.Sheets oSheet = oSheets.getByIndex(oActiveCells.Sheet) ' active table For nRow = oActiveCells.StartRow To oActiveCells.EndRow For nCol = oActiveCells.StartColumn To oActiveCells.EndColumn oCell = oSheet.getCellByPosition(nCol,nRow) CellVal = oCell.getString() oCell.setString(LCase(CellVal)) Next Next End Sub Sub ProperC oDesktop = createUnoService("com.sun.star.frame.Desktop") oDocument = ThisComponent oSelectedCells = oDocument.CurrentSelection oActiveCells = oSelectedCells.RangeAddress oSheets = oDocument.Sheets oSheet = oSheets.getByIndex(oActiveCells.Sheet) ' active table For nRow = oActiveCells.StartRow To oActiveCells.EndRow For nCol = oActiveCells.StartColumn To oActiveCells.EndColumn oCell = oSheet.getCellByPosition(nCol,nRow) CellVal = oCell.getString() oCell.setString(UCase(Left(CellVal,1)) & Right(CellVal,Len(CellVal) - 1) ) Next Next End Sub
Creating the new menu entries is simple. Invoke the Menu Customization dialog with Tools - Customize as shown below...
Select the Menus tab. Add a new top level menu item - TextUtils and then a seperate entry for each of our new functions.
Here is the Add Commands dialog. We select the module in the left hand box and the macro subroutine on the right. By default, the menu entry is given the same name as the subroutine but hat can be changed.
In the next installment, we will add a dialog to enhance out new functionality even further.
