Hi David,

As I understand it you have values in column B and dates in column D. When
a new date is entered in a cell in column D or an existing date is changed
you want the cell on the corresponding row in column B to increase by 1.

e.g. B1 = 5, D1 = May 5, 2019
change D1 and B1 becomes 6.
- or -
e.g. B3 = 26, D3 = blank
set D3 = Feb 3, 2017 and B3 becomes 27

The root of an answer is here,
https://ask.libreoffice.org/en/question/84677/which-event-macro-on-spreadsheet-contents-change/
Provided by Peter Williams.

The macro sample would need modification but seems to clearly demonstrate
the capability you wish to implement.
Sub SheetChange(oEvent)
MsgBox "Column is " & oEvent.CellAddress.Column
MsgBox "Row is " & oEvent.CellAddress.Row
End Sub

On Thu, Dec 12, 2019 at 2:13 PM Johnny Rosenberg <gurus.knu...@gmail.com>
wrote:

> Den tors 12 dec. 2019 kl 05:38 skrev zed <z...@zed.net.nz>:
>
> > Brian Barker <b.m.bar...@btinternet.com> wrote:
> >
> > > At 17:49 11/12/2019 +1300, David Noname wrote:
> > > > I have a spreadsheet in Calc ... It has Columns ... B - No, formatted
> > > > number general ...
> > > >
> > > > Is there a formula that I can enter in Column B which will increase
> > > > incrementally increase the figure by 1, please?
> > >
> > > I think you are saying that you want values in column B to be one
> greater
> > > than they are. That's a contradiction. If the value in Bn is four, you
> > > want it to be five. But that means it's no longer four. And if it's now
> > > five, how would any formula know you do not want it to be six? And so
> on?
> >
> > Thank you for your prompt reply, Brian.  It is much appreciated
> >
> > Perhaps I didn't explain myself clearly enough.
> >
> > In simple terms, I want to know whether there is any way that when I
> enter
> > a
> > new date in Column D it will automaticall increase the current value in
> > Column B by 1.  I cannot think of a solution - but then I only use Calc
> for
> > simple things - but was hoping that there is a solution.  If there
> isn't, I
> > will just have to try and remember to manually increase the value of
> Column
> > B every time I enter a new date in Column D.
> >
>
> Can you explain it again, but this time also mention rows?
> Do you mean that a certain cell in column B, say B1, should increase its
> value when you enter a new date in a previously empty cell in column D? Is
> that cell always direclty below the last used row?
>
> Do you mean that when you enter a date in the D column, the cell at the
> same row in column B should be the cell above it + 1?
>
>
>
> >
> > David
> > --
> > Zed
> > Smoking kills. If you're killed, you've lost a very important part of
> your
> > life.
> >
> > --
> > To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
> > Problems?
> > https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
> > Posting guidelines + more:
> https://wiki.documentfoundation.org/Netiquette
> > List archive: https://listarchives.libreoffice.org/global/users/
> > Privacy Policy: https://www.documentfoundation.org/privacy
> >
> >
>
> --
> To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
> Problems?
> https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
> Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
> List archive: https://listarchives.libreoffice.org/global/users/
> Privacy Policy: https://www.documentfoundation.org/privacy
>


-- 
Alan Boba
CISSP, CCENT, ITIL v3 Foundations 2011

-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Reply via email to