[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libreoffice-users] LibreOffice Calc - Date - increase number times...
- Subject: Re: [libreoffice-users] LibreOffice Calc - Date - increase number times...
- From: Alan B <firstname.lastname@example.org>
- Date: Thu, 12 Dec 2019 23:18:30 -0500
- To: LibreOffice-list <email@example.com>, zed <firstname.lastname@example.org>
A follow up to my first reply. I wanted to investigate a bit more to see if
I could produce a macro that actually incremented values in column B based
on the corresponding cell in column D being changed.
This works for me incrementing the value in col B by +1 when the value in
column D on the same row is changed. Please note, it only works for the
first sheet of the workbook. I expect it could be made to work for the
current sheet but have not investigated how to do that. Changing the order
of the workbook tabs has no effect on which tab is recognized as the first
one. In addition to the reference I named in my first post the information
from this second reference was instrumental in making a macro that only
responded to changes in cells in column D.
https://docs.oracle.com/cd/E19064-01/so6/817-1826-10/817-1826-10.pdf pg. 119
and the macro...
Dim rowNum, colNum as Integer
Dim oDoc, oSheet, oCell as Object
oDoc = StarDesktop.CurrentComponent
oSheet = oDoc.Sheets(0)
if oEvent.CellAddress.Column = 3 then
colNum = oEvent.CellAddress.Column
rowNum = oEvent.CellAddress.Row
oCell = oSheet.getCellByPosition(colNum - 2, rowNum)
oCell.Value = oCell.Value + 1
On Tue, Dec 10, 2019 at 11:50 PM zed <email@example.com> wrote:
> Using LibreOffice v184.108.40.206 on Linux Mint v19.2 Mate
> I have a spreadsheeet in Calc which records data of reactions to a
> particular performer. It is in the form: It has Columns A - G.
> A - Name, fformatted as Text (records thre name of the persons doing the
> B - No, formatted number general (records number of times this
> reactors has reacted to the performer)
> C - First, formatted DD/MM/YY (records the first date the reactor reaacted
> to this performer)
> D - Last, formatted DD/MM.YY (records last date reactor reacted to this
> E - Days, formatted =NOW()-D3 (records number of days since last reaction)
> F - Weeks, formatted =E3/7 (records number of weeks since last reaction)
> G - Months, formatted =F3/4 (records number of months since last reaction.
> Is there a formula that I can enter in Column B which will increase
> incrementally increase the figure by 1, please?
> Regards from New Zealand on a very warm summer evening.
> "To use the term blind faith, is to use an adjective needlessly." Julian
> To unsubscribe e-mail to: firstname.lastname@example.org
> Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
> List archive: https://listarchives.libreoffice.org/global/users/
CISSP, CCENT, ITIL v3 Foundations 2011
To unsubscribe e-mail to: email@example.com
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
|[libreoffice-users] LibreOffice Calc - Date - increase number times...||zed <firstname.lastname@example.org>|
- Prev by Date: Re: [libreoffice-users] How to visualize columns without exponential numbers with E-0...
- Next by Date: [libreoffice-users] impress - slide transitions not working
- Previous by thread: Re: [libreoffice-users] LibreOffice Calc - Date - increase number times...
- Next by thread: [libreoffice-users] How to visualize columns without exponential numbers with E-0...