Sum if cell style is...
-
- Posts: 19
- Joined: Mon Sep 23, 2013 2:44 pm
Sum if cell style is...
i'd like to sum cell that have some style, for example "green". is there any visual basic code, function to try? or existing solution?
LibreOffice 7.4
Re: Sum if cell style is...
Never use a formatting property as some valid spreadsheet data.
Use helper cells and some numeric or textual contents to mark the cells to summarize.
Use helper cells and some numeric or textual contents to mark the cells to summarize.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Sum if cell style is...
The AOO/LO has not built-in VBA feature.is there any visual basic code, function to try?
The built-in StarBasic+API of the AOO/LO and the MS VBA are basically different tools.
Yes, it is possible to write a macro that will read the name of the applied Cell Style in a desired cell range, and then it summarize the numeric contents of the cells that have same Cell Style.
But it is better to follow my first suggestion in my post above.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Sum if cell style is...
See also this discussion on the same topic.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
Re: Sum if cell style is...
viewtopic.php?t=42114&p=194261#p194261 has a document with some user-defined functions to help fixing broken sheets where information is hidden in formatting attributes. There is also a function CELL_STYLE to extract the style name. You can convert this information into a better solution with conditional formatting and with built-in functions such as SUMIF, SUMPRODUCT, filtering, pivot tables or whatever Calc has to offer. With info in attributes you are bare of options.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice