Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenSat, 28 Apr 2018 12:09:04 +0200How do i get calc to input data on a friday as long as the date is not in the futurehttps://ask.libreoffice.org/en/question/153456/how-do-i-get-calc-to-input-data-on-a-friday-as-long-as-the-date-is-not-in-the-future/Libreoffice 6.0.3.2
The title says it but just in case, I'm trying to enter a figure every Friday as long as that Friday is not in the future.
This is the formula I'm using:
=IF(WEEKDAY(A65,2)=5 AND(A65=$A$3),$C$3,0)
Where column A is the Date in descending order
A3 has todays date; TODAY()
I want the data from C3 entered every Friday as long as it is not in the future
I've played around with the AND part AND(A65<=$A$3) or AND(A65>=$A$3)
If I just use =IF(WEEKDAY(A65,2)=5 ,$C$3,0) the formula enters the correct figure every Friday but carries on into the future.
I just cant get it to work.
So as not to get confusing I wont put all variations and results from each variant as it will just confuse things.
UPDATE:
Thanks for taking the time to help, I meant no disrespect asking if you had read my original post.
I looked at your attachment but still cannot get mine to work. If I use [<=] it enters 0. If I put [>=] it enters the correct figure but carries on into the future. I've attached the sheet [here](/upfiles/15251674827349409.ods) so you can see yourself what's going on. As its a work in progress don't worry about the other columns and the formula in C4 is just so I can see it as im working. Only columns A and C are important at the moment. Thanks in advance.
UPDATE 2
I looked at your sheet but need time to analyse it properly.
I have found the problem and your are right in that its related to the date but what I saw looking at my dates in number format was calc putting 5 numbers in the A3 Column [43222] but the dates from A8 onward calc put 7 numbers in, always starting with 66. So the first date in A8 number format was 6643161. I checked via format cells that they were all using the same date format so I don't understand why 66 was added the the dates from A8 on.
To fix I selected all $A cells and cleared contents then entered the dates into A3 then A8 onward. Even after formatting them to the format I wanted the dates worked and looking at them in number format there is no sign of the 66 anymore.
As it is now working this bit is not important but I'm curious why 66 was added to the dates from A8 on. I know I haven't read all your info yet but there is a lot there for me to go through, take in and understand. If you or anyone knows why 66 was added to the dates from A8 on I would welcome an answer. Also note I had made sure column A was formatted as date.
Thank you for taking the time to help.MidnightMan21Sat, 28 Apr 2018 12:09:04 +0200https://ask.libreoffice.org/en/question/153456/