[Solved] Increase cells by 1 across gaps

Discuss the spreadsheet application
Locked
Deletion requested

[Solved] Increase cells by 1 across gaps

Post by Deletion requested »

This thread can be deleted

Screenshots retrieved:
calc-issue-1.png
calc-issue-1.png (90.17 KiB) Viewed 3815 times
calc-issue-2.jpg
calc-issue-2.jpg (119.56 KiB) Viewed 3815 times
Last edited by MrProgrammer on Sun Jan 05, 2025 10:15 pm, edited 7 times in total.
Reason: Lock topic purposely damaged by OP
User avatar
Hagar Delest
Moderator
Posts: 33629
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Increasing cells value by 1 integer

Post by Hagar Delest »

Hi and welcome to the forum!

I have uploaded your screenshots, the first one needed to be reduced in colors to pass the size limit (saving directly in .png would have been enough I think).
Can you upload a sample file instead so that we can try directly? (see: How to attach a document here.)
You can set the SMT string as a user-defined format so that the cell remains a number.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
User avatar
Lupp
Volunteer
Posts: 3756
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Increasing cells value by 1 integer

Post by Lupp »

Please don't attach or insert silly screenshots. Attach consciously prepared example files instead. (Shortened; confidential content removed.)
You can't change the actual content of cells except by editing (interaction), or by using ready-made tools, or by user code ("macros").
What you can show in the respective cells based on automatic recalculation always are calculated results of formulas residing in the cells as their actual content.
A ready-made tool for such an extremely specialized case does, of course, not exist.
To write a macro for the purpose you would need to learn how to do so.

See attached example.
aoo112283veryStrangeIncrementing.ods
(14 KiB) Downloaded 80 times
If the target cells in column C are allowed to return formatted numbers as the results, everything would be very simple, but for some use-cases this may not be appropriate.
On Windows 10: LibreOffice 25.8.4 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
User avatar
MrProgrammer
Moderator
Posts: 5430
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Increasing cells value by 1 integer

Post by MrProgrammer »

Deletion requested wrote: Mon Dec 30, 2024 1:03 pm This thread can be deleted
Deletion requested, it is quite rude to ask people for advice, and then after receiving it, delete your question. I see that you are new here, so let me explain how this forum works.

We are a group of volunteers who help people using OpenOffice and related software. In the last 15 years we have created a large body of knowledge about this software. Using the search feature of the forum, many people can find a solution to their problem by entering a few keywords and reviewing the matches. It is likely that others have asked about similar topics and the searcher can get an immediate answer. This body of knowledge would not exist if topics were deleted when they were solved.

Although I can no longer see your initial post, the responses from Hagar Delest and Lupp make me fairly sure what it was. I believe that similiar questions have been asked and answered previously. Your initial mistake here may have been not reading the Survival guide where you would have learned about forum poliicy search first before posting. We understand that new people sometimes, even if they try to search and get a quick answer, cannot formulate a proper query. Thus they create a topic about something that has been asked previously dozens of times. Personally, in those situations, my response is a one-line link to a former topic.

Your more serious mistake was deleting your question after receiving responses and thus not contributing to the forum's knowledge base. And you have been rude to the people who helped you, since their contributions are now mostly a waste of their time in a worthless topic. Do not ever delete your initial post again, just mark it as solved. Instructions for that are in the Survival Guide.

If you make this mistake again and delete a post, making it worthless for others, you will be deleted from the forum as well. If you later return, keep in mind that in exchange for advice you must respect our forum rules and preserve all conributions to our knowledge base.
Last edited by Hagar Delest on Tue Dec 31, 2024 11:24 am, edited 1 time in total.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
Hagar Delest
Moderator
Posts: 33629
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Increasing cells value by 1 integer

Post by Hagar Delest »

I have retrieved the screenshots (and locked the post). The issue for OP is that the cells cannot be dragged to increment the series because in some cases the line is for the date, thus no entry.
Since the time seems to be entered as text, I would have used an IF condition: if cell in A is text, then take the max of the range defined by C$3 to the cell above and add 1. With SMT being displayed by a user-defined cell formatting.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
cwolan
Posts: 214
Joined: Sun Feb 07, 2021 3:44 pm

Re: Increasing cells value by 1 integer

Post by cwolan »

Hagar Delest wrote: Mon Dec 30, 2024 5:18 pm Since the time seems to be entered as text, I would have used an IF condition: if cell in A is text [...]
Perhaps is a entered as text.
On the other hand entries in column G and H suggest Italian. For time values in Italy, the format HH.MM.SS is often used
(cf. locale data) in the source code.
OpenOffice 1.1.5 – 4.1.16
LibreOffice 3.3.0.4 – 26.2
Windows 7,10,11 64-bit
Deletion requested

Re: Increasing cells value by 1 integer

Post by Deletion requested »

MrProgrammer wrote: Mon Dec 30, 2024 5:07 pm [...] you will be deleted from the forum as well.
Sorry for the inconvenience, I tried sending two account deletion requests, but haven't had any answers, yet.
If you can, please delete my account and all my activities from the forum.
Thank you very much!
User avatar
Hagar Delest
Moderator
Posts: 33629
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Increasing cells value by 1 integer

Post by Hagar Delest »

I did receive one of the request for account deletion (one hour ago). I will proceed with the deletion of your account (account name will be changed too), after posting so that you still get a last notification for this discussion.
However, this topic is now a public discussion and the screenshots do not show any personal data. It still may help other users since we roughly get the initial intent.
You can still contact the admin team by mail.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
Locked