Hello everyone!
I recently discovered a macro recorder in excel and use it to save time with some annoying repetitive actions.
Unfortunately, with one of them I cannot succeed. I am trying to enter data with a formula. The data is visually in the same place, but in different rows.
The idea is as follows:
In the specified table I hide the first row, go to the bottom in the first cell (C93) I write the word "board", the second cell (C94) I equate to cell A2, in the third (C95) I write "1", then the fourth, fifth, sixth and seventh fields I equate to cells F11, P11, N11 and L11.
What I'm trying to do is hide the rows from 1 to 14, mark cell D93 and repeat the same operations for the next data, but the macro remembers my cell number, not its position.
Can anyone help me with ideas?
Thanks in advance!
Here there is the macro that I recorded:
- Sub MDB_Data()
- '
- ' MDB_Data Macro
- '
- ' Keyboard Shortcut: Ctrl+Shift+X
- '
- ActiveCell.FormulaR1C1 = "board"
- ActiveCell.Offset(1, 0).Range("A1").Select
- Application.CutCopyMode = False
- ActiveCell.FormulaR1C1 = "=R[-92]C[-2]"
- ActiveCell.Offset(1, 0).Range("A1").Select
- ActiveCell.FormulaR1C1 = "1"
- ActiveCell.Offset(1, 0).Range("A1").Select
- Application.CutCopyMode = False
- ActiveCell.FormulaR1C1 = "=R[-85]C[3]"
- ActiveCell.Offset(1, 0).Range("A1").Select
- Application.CutCopyMode = False
- ActiveCell.FormulaR1C1 = "=R[-86]C[13]"
- ActiveCell.Offset(1, 0).Range("A1").Select
- Application.CutCopyMode = False
- ActiveCell.FormulaR1C1 = "=R[-87]C[11]"
- ActiveCell.Offset(1, 0).Range("A1").Select
- Application.CutCopyMode = False
- ActiveCell.FormulaR1C1 = "=R[-88]C[9]"
- ActiveCell.Offset(1, 0).Range("A1").Select
- End Sub