I have a spreadsheet with a mixture of mandatory and optional fields. Having filled one mandatory field, a right arrow should go to the next mandatory field, but optional fields that have been skipped can be selected using the mouse. In a few places a mandatory field consists of two or more merged cells to allow for extra data. When I enter a merged cell field with the arrow keys, and it subsequently jumps to the next mandatory cell, when I leave that next cell it can go to the wrong position. I have narrowed the problem down and it can be demonstrated in the following:
The VBA code attached to this cut down example is as follows:
Moving round the sheet using the keyboard arrow keys, if you go into 'A' it immediately jumps to 'B' and vice versa. However, if I go into 'A' and then try leaving 'B' with the arrow keys, the next cell selected is not one immediately next to 'B'. If I use the mouse to select the same sequence of cells, it works as I believe it should.
Is there a way of moving around such a worksheet with the arrow keys without this issue occurring?
I have tried it on Excel 2007, 2013 and 2019, all of which show the same effect. I have also set up a similar worksheet on Excel 97, which exhibits the same behavior. Advice will be appreciated. Thanks.
The VBA code attached to this cut down example is as follows:
Moving round the sheet using the keyboard arrow keys, if you go into 'A' it immediately jumps to 'B' and vice versa. However, if I go into 'A' and then try leaving 'B' with the arrow keys, the next cell selected is not one immediately next to 'B'. If I use the mouse to select the same sequence of cells, it works as I believe it should.
Is there a way of moving around such a worksheet with the arrow keys without this issue occurring?
I have tried it on Excel 2007, 2013 and 2019, all of which show the same effect. I have also set up a similar worksheet on Excel 97, which exhibits the same behavior. Advice will be appreciated. Thanks.