We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question

student's profile - activity

2021-02-14 06:09:05 +0200 marked best answer How to use a sheet as a macro?

Consider the following scenario:

You have a sheet A with complex calculations that depend on some parameters P1,P2 and P3 given on a sheet B which gives a result R.

Now I want to make a parameter study, of how R changes with the parameters P1,P2 and P3. Sure I can manually adjust the parameters P1,P2 and P3 and see how R changes. But I want a table with lots of different parameter values and resulting values of R. One way to do this is to reimplement all of the complex calculations done in sheet A to a macro.

Now my question is, if there is a more direct way to do this. I.e. (semi-) automatically convert the calculation in A to a macro which I can call to fill my table.

2019-06-15 15:46:19 +0200 received badge  Popular Question (source)
2019-06-15 15:46:19 +0200 received badge  Notable Question (source)
2019-06-15 15:46:19 +0200 received badge  Famous Question (source)
2019-01-27 19:02:59 +0200 received badge  Notable Question (source)
2019-01-27 19:02:59 +0200 received badge  Famous Question (source)
2018-11-03 04:52:09 +0200 received badge  Popular Question (source)
2018-11-02 22:17:26 +0200 commented answer BASIC runtime error. Sub-procedure or function procedure not defined

Thanks, is there also a function accessible directly from basic which does the same as the round function from the sheet

2018-11-02 21:24:59 +0200 asked a question BASIC runtime error. Sub-procedure or function procedure not defined

BASIC runtime error. Sub-procedure or function procedure not defined I tried the following test macro in libreoffice, bu

2018-11-01 15:15:08 +0200 commented answer Autofill without changing format

Thanks, but this doesn't seem to answer my question because 1. it influences the format of cells and 2. inserts only a s

2018-10-31 12:57:35 +0200 asked a question Autofill without changing format

Autofill without changing format Is there a way to Autofill a series of cells without changing the formatting of

2018-01-20 19:54:06 +0200 received badge  Notable Question (source)
2018-01-20 14:02:48 +0200 received badge  Popular Question (source)
2018-01-20 13:18:57 +0200 received badge  Student (source)
2018-01-20 11:41:08 +0200 asked a question How to use a sheet as a macro?

How to use a sheet as a macro? Consider the following scenario: You have a sheet A with complex calculations that dep

2017-04-27 15:13:32 +0200 received badge  Famous Question (source)
2016-07-19 11:18:04 +0200 received badge  Famous Question (source)
2016-05-21 07:08:25 +0200 received badge  Notable Question (source)
2016-05-20 17:12:09 +0200 received badge  Popular Question (source)
2016-05-20 12:05:59 +0200 asked a question Is the "split window" option gone?

I just upgraded my ubuntu from 15.10 to 16.04. On the old system I had libreoffice 5.0.5.2 on the newer system 5.1.2.2.

On the old version in libreoffice calc there is an option "Window -> Split Window" (and also freeze Window). In the new version this option is gone. Why was this removed? Is this feature available in an other menu in the new version?

2016-03-06 13:05:57 +0200 received badge  Famous Question (source)
2016-03-04 23:56:18 +0200 marked best answer How to get the equation of a trend line in Calc?

Suppose I have a (xy scatter) diagram in localc and insert a trend line, for example a linear one of the type f(x) = ax + b. I know hot to display the equation in the diagram, but how can I reference to the parameters a and b in a cell to make further calculations with it?

2016-02-29 16:46:51 +0200 marked best answer Methods for keeping overview over a large number of tabs in localc

Suppose I have a very large number of sheets in my file, as indicated in the following screenshot: image description

What are good methods to keep an overview over them? Is it possible to arrange them on a grid or on a vertical list, so that I can view all of them and not only sheet11 to sheet30 as in my example?

2016-02-29 16:43:05 +0200 marked best answer Can I use latex formulas to typeset axis labels in Calc charts?

Is it possible to enter the axis labels in calc diagrams as latex formulas? If so, how to do it?

2015-10-28 03:02:55 +0200 marked best answer Alternating colors for a selected regions with macro

I want to have alternating background colors on a region of a table in libreoffice calc. I know that there are multiple methods to do so, including conditional formatting and autoformat (each one has advantages and disadvantages) and last but not least writing a macro.

If I take the following macro from this answer it works fine except of three things:

  1. If you select a rectangular region and apply it, it nevertheless colors every second whole row (and not just the part in the region)
  2. If a cell is already colored, it doesn't overwrite the color.
  3. If you applied the macro to a region and you want to undo it, you have to undo every step of the loop. It would be better if on undo click would undo the whole alternating coloring process, i.e. the whole macro.

How can I modify the macro to make the points above work?

Sub ColorizeTable

Dim oCurrentSelection As Variant
Dim oRows As Variant
Const nCellBackColor = 15132415 REM # "Blue gray"
Dim i As Long
    oCurrentSelection = ThisComponent.getCurrentSelection()
    If oCurrentSelection.supportsService("com.sun.star.table.CellRange") Then
        oRows = oCurrentSelection.getRows()
        For i = 0 To oRows.getCount()-1 Step 2
            oRows.getByIndex(i).setPropertyValue("CellBackColor", nCellBackColor)
        Next i
    EndIf
End Sub
2015-10-11 17:20:23 +0200 received badge  Notable Question (source)
2015-10-11 14:53:45 +0200 received badge  Supporter (source)
2015-10-11 14:53:41 +0200 received badge  Popular Question (source)
2015-10-11 11:49:17 +0200 asked a question How to type a = character in a libre office writer table

When I type a = character in a libreoffice writer table it switches to the formula line instead of just inserting a = character.

  • How can I just type a = character (as first character in a cell)?
  • How can I change it permamently that typing a = character just inserts that character and not prompts for a formula
2015-02-11 00:31:12 +0200 received badge  Famous Question (source)
2014-11-19 12:04:51 +0200 received badge  Notable Question (source)
2014-11-19 07:13:57 +0200 received badge  Enthusiast
2014-11-19 01:13:18 +0200 received badge  Popular Question (source)
2014-11-18 19:18:11 +0200 commented question How to color rows automatically depending on an id

The reason is that the table is large (20 - 40 rows) and the id's may be changing, so I don't want to think about which colors to use each time. However it would be ok to define say 40 colors once if this works on every new table afterwards without manual interventions...

2014-11-18 18:48:54 +0200 asked a question How to color rows automatically depending on an id

Consider the following minimal example:

image description

I want that two rows with the same group id have the same background color and that rows with different group id's have different background colors. If I change a group id the colors should adapt automatically. I don't want to specify which colors to use, this should be done automatically.

What is the easiest way to to this?

2014-11-18 18:43:40 +0200 received badge  Famous Question (source)
2014-08-26 10:07:00 +0200 received badge  Famous Question (source)
2014-07-13 16:58:25 +0200 received badge  Notable Question (source)