Ask Your Question

MrMusAddict's profile - activity

2017-04-01 16:53:37 +0100 received badge  Famous Question (source)
2015-10-15 16:28:42 +0100 received badge  Famous Question (source)
2015-08-25 10:19:16 +0100 received badge  Notable Question (source)
2015-08-24 06:04:42 +0100 received badge  Notable Question (source)
2015-07-31 19:20:01 +0100 received badge  Enthusiast
2015-07-28 21:04:07 +0100 received badge  Popular Question (source)
2015-07-27 20:19:15 +0100 commented question Calc VBA Macro: Any way to conditionally format text color?

"any silly code compile and run if you comment out all the stuff" : I was trying to point out the fact that calc still runs Range().FormatConditions, but doesn't allow me to alter the font within the With code. -- "why didn't you simply apply the Conditional Format manually?" : I'm assuming you mean after the macro runs? Well, that defeats the purpose of the macro (at least this one).

2015-07-27 18:48:36 +0100 asked a question Calc VBA Macro: Any way to conditionally format text color?

I am in charge of generating and maintaining excel documents at work, and I have created a few robust macros in which our company will use. I originally created the macros in excel, but we now have began a migration to Libreoffice.

The macros themselves are simple enough, so aside from the conditional formatting issue, they work flawlessly.

It seems in the version of LibreOffice I have (4.3.2.2), I am able to create the condition, however I am not able to alter any attributes. For example:

With Range("C14:Q14, C19:Q19, C23:Q23, T14, T19, T23").FormatConditions _
    .Add(xlCellValue, xlLess, 0.95)
    '.Font.Color = RGB(190, 0, 0)
    ''.Font.Bold = True
End With

This code compiles, and runs, so I am assuming that I am successfully defining a condition , but as soon as I remove the singe quotes, I receive an error:

BASIC runtime error.
'423'
FormatConditions

So, I'm assuming that FormatConditions is Excel specific? If so, is there a way to use styles in conjunction with a condition?

2015-06-26 08:08:22 +0100 received badge  Popular Question (source)
2015-06-26 00:11:25 +0100 commented answer Calc: char(10) does not copy as text?

Thank you! I replaced all char(10) with char(13)&char(10), and it is working beautifully :)

2015-06-26 00:10:45 +0100 received badge  Scholar (source)
2015-06-25 19:20:10 +0100 received badge  Popular Question (source)
2015-06-25 19:20:10 +0100 received badge  Famous Question (source)
2015-06-25 19:20:10 +0100 received badge  Notable Question (source)
2015-06-25 19:17:14 +0100 received badge  Editor (source)
2015-06-25 19:16:34 +0100 asked a question Calc: char(10) does not copy as text?

Hello,

I intended to have a spreadsheet which outputs data into a single copy-able cell, to be pasted into notepad or other text based applications.

In its simplest form, I intended something like this:

A1="Line1"
A2="Line2"
A3="Line3"
A4=A1&CHAR(10)&A2&CHAR(10)&A3

Intended output (which shows correctly within Libreoffice):

Line1
Line2
Line3

Output when A4 is copied/pasted as text:

Line1Line2Line3

Is there a way around this?

2014-12-12 23:26:17 +0100 commented answer Counting number of times two adjacent cells match a certain criteria

Thank you, this worked! I would upvote you, but I don't have enough points :/

2014-12-12 21:55:46 +0100 asked a question Counting number of times two adjacent cells match a certain criteria

Hello, I'm looking for a way to count the number of times two adjacent cells in two separate columns match. In this example, column A contains vehicle types ("SUV", "Sedan", "Truck"), and in column B contains vehicle color ("Red", "Blue", "Black").

I want to count the number of black SUVs:

       A        B
1    SUV      Red
2    Truck    Blue
3    Sedan    Red
4    SUV      Black
5    Sedan    Blue
6    Truck    Blue
7    SUV      Black

In this case, the function should print 2.

Is there a way to do this?