Strange issue with NOW() that i have not encountered before

classic Classic list List threaded Threaded
7 messages Options
pete nikolic pete nikolic
Reply | Threaded
Open this post in threaded view
|

Strange issue with NOW() that i have not encountered before

Hi Folks

I am having an issue with NOW()   .

I am using    =IF(ISBLANK(A3),"", IF( ISNUMBER(B3), B3, NOW() ) )  
I have copied this by dragging the corner of the cell to 100 other cells the
problem is  when i enter data into a cell in coloum 3 the time changes in every
cell in coloum 3 and it should not it does not in another sheet that is using
exactly the same formula .

What am i doing wrong  ..

Thanks Pete .



--
To unsubscribe e-mail to: [hidden email]
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

steveedmonds steveedmonds
Reply | Threaded
Open this post in threaded view
|

Re: Strange issue with NOW() that i have not encountered before

I am expecting that NOW() will update every time any cell recalculates.
I do not know how recalculation is controlled.

I have come across this before and ended up referencing a fixed time in
cell (pasted from NOW())
steve

On 31/10/2019 09:02, pete wrote:

> Hi Folks
>
> I am having an issue with NOW()   .
>
> I am using    =IF(ISBLANK(A3),"", IF( ISNUMBER(B3), B3, NOW() ) )  
> I have copied this by dragging the corner of the cell to 100 other cells the
> problem is  when i enter data into a cell in coloum 3 the time changes in every
> cell in coloum 3 and it should not it does not in another sheet that is using
> exactly the same formula .
>
> What am i doing wrong  ..
>
> Thanks Pete .
>
>
>



--
To unsubscribe e-mail to: [hidden email]
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
Brian Barker Brian Barker
Reply | Threaded
Open this post in threaded view
|

Re: Strange issue with NOW() that i have not encountered before

In reply to this post by pete nikolic
At 20:02 30/10/2019 +0000, Pete Noname wrote:
>I am having an issue with NOW() .

Unfortunately for you, NOW() means "now"; it may be that you need a
THEN() function!

>I am using =IF(ISBLANK(A3),"", IF( ISNUMBER(B3), B3, NOW() ) )
>I have copied this by dragging the corner of the cell to 100 other
>cells the problem is when i enter data into a cell in column 3 ...

Er, column A, perhaps?

>... the time changes in every cell in column 3 and it should not.

You clearly don't want it to, but since NOW() means "now", it should.
By default, each time you make changes to a spreadsheet, formulae are
recalculated, and since all your formulae contain a reference to
NOW(), that will be updated to the current date and time, not the one
at which previous changes were made.

>it does not in another sheet that is using exactly the same formula.

One possibility is that you have AutoCalculate toggled off there, but
that will prevent *any* changes, so the original date and time will
not be inserted where you require it. You can use Recalculate to
cause new changes to happen, but - once again - that will affect all
parts of your spreadsheet and so change all the dates and times.

One workaround is, each time you make an entry and create a new date
and time, to copy the cell contents and paste them back, but using
Edit | Paste Special... (or Ctrl+Shift+V, or right-click | Paste
Special...) instead of ordinary Paste. In the Paste Spacial dialogue,
ensure "Paste all" is not ticked and "Formulae" is not ticked. This
will remove the formula and freeze the contents of that cell. But
note that any later changes to the corresponding data cell will no
longer change the date and time in that cell.

I trust this helps.

Brian Barker


--
To unsubscribe e-mail to: [hidden email]
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

Tim Deaton Tim Deaton
Reply | Threaded
Open this post in threaded view
|

Re: Strange issue with NOW() that i have not encountered before

On 10/30/2019 5:11 PM, Brian Barker wrote:

> At 20:02 30/10/2019 +0000, Pete Noname wrote:
>> I am having an issue with NOW() .
>
> Unfortunately for you, NOW() means "now"; it may be that you need a
> THEN() function!
>
>> I am using =IF(ISBLANK(A3),"", IF( ISNUMBER(B3), B3, NOW() ) )
>> I have copied this by dragging the corner of the cell to 100 other
>> cells the problem is when i enter data into a cell in column 3 ...
>
> Er, column A, perhaps?
>
>> ... the time changes in every cell in column 3 and it should not.
>
> You clearly don't want it to, but since NOW() means "now", it should.
> By default, each time you make changes to a spreadsheet, formulae are
> recalculated, and since all your formulae contain a reference to
> NOW(), that will be updated to the current date and time, not the one
> at which previous changes were made.
>
>> it does not in another sheet that is using exactly the same formula.
>
> One possibility is that you have AutoCalculate toggled off there, but
> that will prevent *any* changes, so the original date and time will
> not be inserted where you require it. You can use Recalculate to cause
> new changes to happen, but - once again - that will affect all parts
> of your spreadsheet and so change all the dates and times.
>
> One workaround is, each time you make an entry and create a new date
> and time, to copy the cell contents and paste them back, but using
> Edit | Paste Special... (or Ctrl+Shift+V, or right-click | Paste
> Special...) instead of ordinary Paste. In the Paste Spacial dialogue,
> ensure "Paste all" is not ticked and "Formulae" is not ticked. This
> will remove the formula and freeze the contents of that cell. But note
> that any later changes to the corresponding data cell will no longer
> change the date and time in that cell.
>
> I trust this helps.
>
> Brian Barker
>
This reply confuses me.  The OP is using NOW() as the final option in a
nested IF() statement.  So, to my understanding, NOW() should not be
executed unless both of the first two options fail. Otherwise, it
appears that the mere presence of the NOW() statement as one of the
options causes the rest of the IF() statement to be rendered null and
void.  To me, that behavior makes it a bug.

-- Tim Deaton


--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


--
To unsubscribe e-mail to: [hidden email]
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
Brian Barker Brian Barker
Reply | Threaded
Open this post in threaded view
|

Re: Strange issue with NOW() that i have not encountered before

At 16:21 31/10/2019 -0400, Tim Deaton wrote:

>On 10/30/2019 5:11 PM, Brian Barker wrote:
>>  At 20:02 30/10/2019 +0000, Pete Nikolic wrote:
>>>I am having an issue with NOW() .
>>
>>Unfortunately for you, NOW() means "now"; it may be that you need a
>>THEN() function!
>>
>>>I am using =IF(ISBLANK(A3),"", IF( ISNUMBER(B3), B3, NOW() ) )
>>>I have copied this by dragging the corner of the cell to 100 other
>>>cells the problem is when i enter data into a cell in column 3 ...
>>
>>Er, column A, perhaps?
>>
>>>... the time changes in every cell in column 3 and it should not.
>>
>>You clearly don't want it to, but since NOW() means "now", it
>>should. By default, each time you make changes to a spreadsheet,
>>formulae are recalculated, and since all your formulae contain a
>>reference to NOW(), that will be updated to the current date and
>>time, not the one at which previous changes were made.
>>
>>[...]
>
>This reply confuses me. The OP is using NOW() as the final option in
>a nested IF() statement. So, to my understanding, NOW() should not
>be executed unless both of the first two options fail. Otherwise, it
>appears that the mere presence of the NOW() statement as one of the
>options causes the rest of the IF() statement to be rendered null
>and void. To me, that behavior makes it a bug.

But both the IF() tests *will* fail in the circumstances the
questioner is referring to: they failed when he entered data on other
rows earlier - and caused the date and time to be produced in the
cell - and will do so again when the formula is recalculated as a
result of a new entry on a different row. On any row where either of
the IF conditions is true, NOW() is indeed not used and no problem is seen.

Brian Barker


--
To unsubscribe e-mail to: [hidden email]
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

steveedmonds steveedmonds
Reply | Threaded
Open this post in threaded view
|

Re: Strange issue with NOW() that i have not encountered before

In reply to this post by Tim Deaton
Hi.

On 01/11/2019 09:21, Tim Deaton wrote:

> On 10/30/2019 5:11 PM, Brian Barker wrote:
>> At 20:02 30/10/2019 +0000, Pete Noname wrote:
>>> I am having an issue with NOW() .
>>
>> Unfortunately for you, NOW() means "now"; it may be that you need a
>> THEN() function!
>>
>>> I am using =IF(ISBLANK(A3),"", IF( ISNUMBER(B3), B3, NOW() ) )
>>> I have copied this by dragging the corner of the cell to 100 other
>>> cells the problem is when i enter data into a cell in column 3 ...
>>
>> Er, column A, perhaps?
>>
>>> ... the time changes in every cell in column 3 and it should not.
>>
>> You clearly don't want it to, but since NOW() means "now", it should.
>> By default, each time you make changes to a spreadsheet, formulae are
>> recalculated, and since all your formulae contain a reference to
>> NOW(), that will be updated to the current date and time, not the one
>> at which previous changes were made.
>>
>>> it does not in another sheet that is using exactly the same formula.
>>
>> One possibility is that you have AutoCalculate toggled off there, but
>> that will prevent *any* changes, so the original date and time will
>> not be inserted where you require it. You can use Recalculate to
>> cause new changes to happen, but - once again - that will affect all
>> parts of your spreadsheet and so change all the dates and times.
>>
>> One workaround is, each time you make an entry and create a new date
>> and time, to copy the cell contents and paste them back, but using
>> Edit | Paste Special... (or Ctrl+Shift+V, or right-click | Paste
>> Special...) instead of ordinary Paste. In the Paste Spacial dialogue,
>> ensure "Paste all" is not ticked and "Formulae" is not ticked. This
>> will remove the formula and freeze the contents of that cell. But
>> note that any later changes to the corresponding data cell will no
>> longer change the date and time in that cell.
>>
>> I trust this helps.
>>
>> Brian Barker
>>
> This reply confuses me.  The OP is using NOW() as the final option in
> a nested IF() statement.  So, to my understanding, NOW() should not be
> executed unless both of the first two options fail. Otherwise, it
> appears that the mere presence of the NOW() statement as one of the
> options causes the rest of the IF() statement to be rendered null and
> void.  To me, that behavior makes it a bug.
>
> -- Tim Deato
We have not seen some contents of columns A and B from the new sheet and
the old sheet to try to replicate the issue, may be it is a bug or may
be the formula is doing what it should be.
steve

--
To unsubscribe e-mail to: [hidden email]
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
Brian Barker Brian Barker
Reply | Threaded
Open this post in threaded view
|

Re: Strange issue with NOW() that i have not encountered before

At 10:53 01/11/2019 +1300, Steve Edmonds wrote:

>On 01/11/2019 09:21, Tim Deaton wrote:
>>On 10/30/2019 5:11 PM, Brian Barker wrote:
>>>At 20:02 30/10/2019 +0000, Pete Nikolic wrote:
>>>>I am having an issue with NOW() .
>>>
>>>Unfortunately for you, NOW() means "now"; it may be that you need
>>>a THEN() function!
>>>
>>>>I am using =IF(ISBLANK(A3),"", IF( ISNUMBER(B3), B3, NOW() ) )
>>>>I have copied this by dragging the corner of the cell to 100
>>>>other cells the problem is when i enter data into a cell in column 3 ...
>>>
>>>Er, column A, perhaps?
>>>
>>>>... the time changes in every cell in column 3 and it should not.
>>>
>>>You clearly don't want it to, but since NOW() means "now", it
>>>should. By default, each time you make changes to a spreadsheet,
>>>formulae are recalculated, and since all your formulae contain a
>>>reference to NOW(), that will be updated to the current date and
>>>time, not the one at which previous changes were made.
>>>
>>>[...]
>>
>>This reply confuses me. The OP is using NOW() as the final option
>>in a nested IF() statement. So, to my understanding, NOW() should
>>not be executed unless both of the first two options fail.
>>Otherwise, it appears that the mere presence of the NOW() statement
>>as one of the options causes the rest of the IF() statement to be
>>rendered null and void. To me, that behavior makes it a bug.
>
>We have not seen some contents of columns A and B from the new sheet
>and the old sheet to try to replicate the issue, maybe it is a bug
>or maybe the formula is doing what it should be.

We haven't - but we don't need to. If any row has the date and time
in the formulae column, it must be that whatever is in columns A and
B in that row means that both IF() conditions failed. When the
questioner makes changes in other rows (the problem situation), there
is no change to existing rows and both IF() conditions will again
fail in those rows. So the recalculation will mean that cells in
relevant rows will execute the NOW() function again and (unhelpfully
for him) bring the date and time up to date.

Brian Barker  


--
To unsubscribe e-mail to: [hidden email]
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