Apache OpenOffice (AOO) Bugzilla – Issue 17396
Macros fail if formula is recorded using arrow-keys to reference cells
Last modified: 2003-09-16 11:21:52 UTC
In the attached spreadsheet, I recorded a simple macro to learn about the functionality of the recorder. I inserted some numbers in columns B and C. Then I started the Macro recorder and wrote = B3 + C3 in cell D3. Then I copied cell D3 to cells D4 to D8. At this point I stopped recording the macro. However, when I run the Macro, it only produces the result of B3 + C3. Also, the result is produced in cell E3 and not D3.
Created attachment 8022 [details] Macro recording problem
Hi Skotti, one for you I think. Frank
Hi Magrawal, if you take a look at the BASIC code that has been recorded by the Macro recorder, you will find that the cell positions are recorded absolute. This explains why the formula is always the same. We cannot record formulas with relative cellreferences at this time. However, when entering the formula by hand (not using the arrow-keys to select the cells) should work (this means: the selection ends up where you expect it) Reproduction (Without qoutes): 1. Type "1" into B2 2. Type "2" into C2 3. Start recording 4. Press "CTRL+HOME" to go to A1 5. Move the selection to D2 using the arrow keys 6. Enter "=C2+B2" using the arrow-keys to select the cells C2 and B2 (This is important!) 7. Press "Enter" 8. Save the Macro 9. Replay On replay the Formula ends up in B2, both B2 and D2 show "err:522" which is caused by the incorrect placement of the formula.
NN: Your task?
See issue 9769. *** This issue has been marked as a duplicate of 9769 ***
duplicate, closing.