I don’t think something of the kind is implemented. You will need user code (in your case custom code?) for the purpose.
Always concerned to make “financial transactions nicer” (for other people), and when feeling a little bit bored, I designed a usable solution.
It is contained in this attachment. Check the code for beeing clean (no malware) and reload it with permission for macro execution.
The document comes with a special little toolbar with only one sensitive area labeled IncDec
.
Together with the modifiers Shift/Ctrl/Alt it should be sufficiently flexible. The usage is explaind in the sheet.
Have a lot of fun.
If you decide to actually use the code in the long run you should
- move it to your local ‘Standard’ library,
- add the Sub for direct call to an appropriate toolbar,
- consider to donate to a foundation supporting a children’s hospital (or something of the kind).
===Edit 2020-03-13 about 22:10 UTC===
On a long walk I got a hunch there might be an issue with the DateSerial function of Basic - and there was. It is unable (unwilling) to allow for carries caused by excess month or day ordinals. The comparable Calc function DATE handles carries as needed for the purpose, and I reworked the code to use DATE via a FunctionAccess object. In addition I decided to also implemet treatment for values formatted ‘TimeOnly’ (independent of whether or not they have a hidden date part). The logical (Boolean) format is now also handled - by simple negation.
I would suggest you use (if at all) the new version contained in this new attachment. I even consider to use the tool myself. A test is started.
[Edit 2021-09-09 about 21:40 GMT]
Having seen due to a question in a forum that incrementing and decrementing may be a topic for many users, I reworked the old example slightly, simplified the handling a little bit, and added functionality for some purposes. A guiding principle still is to regard the number format of the cell having the focus, and therefore being processed. The step widths depend on that type, and in case of numers formatted the “scientific” way, by default inc/dec works with the exponent (what results in the application of a factor). The modifier Alt
is no longer used for “decrease” (extra area in the toolbar now) and can therefore help with disambiguations concerning DateTime
and Scientific
.
Due to the extensive functionality, it’s necessary, of course, for users to talke some time for getting familiar with the tool. It should then be useful in some cases. (I personally don’t need it currently.)
Please note: Opening the example you will most likely find the special document toolbar docked and locked somewhere. Yo can unlock it and move it to a place nbetter suiting you.
If you actually start long-term usage, you will place the tool bar in the standard area anyway, and move the relevant module incdec
to your Standard
library. (Resolve name conflicts if any!)
New example containing the reworked code:
ask233471_IncrementDecrementByModifiedToolbar20210909.ods (31.6 KB)
[/Edit]