Macro - Add row, auto fill text and formulas with relative OFFSS
Closed
DaliaPerlai
TrowaD
- Posts
- 4
- Registration date
- Tuesday November 6, 2012
- Status
- Member
- Last seen
- November 6, 2012
TrowaD
- Posts
- 2886
- Registration date
- Sunday September 12, 2010
- Status
- Moderator
- Last seen
- June 27, 2022
Related:
- Macro - Add row, auto fill text and formulas with relative OFFSS
- Excel macro add row to bottom of table ✓ - Forum - Excel
- Excel auto add row to another sheet - Guide
- Excel formula to add rows based on cell value - Forum - Excel
- MOREFUNC (Macro add-in for EXCEL) - Download
- Need Macro- Copy Row and Insert 10 times ✓ - Forum - Excel
4 replies
TrowaD
Nov 6, 2012 at 10:01 AM
- Posts
- 2886
- Registration date
- Sunday September 12, 2010
- Status
- Moderator
- Last seen
- June 27, 2022
Nov 6, 2012 at 10:01 AM
Dear Lady,
Select a cell in the newly added row and run the following code:
Best regards,
Trowa
Select a cell in the newly added row and run the following code:
Sub AddFormula() Dim x As Integer x = ActiveCell.Row Range("B" & x).Value = x - 4 ActiveSheet.Hyperlinks.Add Range("B" & x), "", "Sheet" & x - 4 & "!A1" Range("C" & x).Formula = "=Sheet" & x - 4 & "!$A$1" Range("I" & x).Formula = "=OFFSET(Sheet" & x - 4 & "!$A$1,17,1,1)" End Sub
Best regards,
Trowa
DaliaPerlai
Nov 6, 2012 at 08:47 AM
- Posts
- 4
- Registration date
- Tuesday November 6, 2012
- Status
- Member
- Last seen
- November 6, 2012
Nov 6, 2012 at 08:47 AM
Anyone can help for lady?
DaliaPerlai
Nov 6, 2012 at 12:58 PM
- Posts
- 4
- Registration date
- Tuesday November 6, 2012
- Status
- Member
- Last seen
- November 6, 2012
Nov 6, 2012 at 12:58 PM
Thank you very much, it was very useful for me.
DaliaPerlai
Nov 6, 2012 at 01:02 PM
- Posts
- 4
- Registration date
- Tuesday November 6, 2012
- Status
- Member
- Last seen
- November 6, 2012
Nov 6, 2012 at 01:02 PM
But I have one more problem.
I have button, which instert date in the cell A1
I need, that in the cell a1 will be date of the time, when I pushed the button.
Now I use function =TODAY(), but this function is not suitable for me. He show actualy date every day, but not the date of the time, when I pushed the button...
I have button, which instert date in the cell A1
I need, that in the cell a1 will be date of the time, when I pushed the button.
Now I use function =TODAY(), but this function is not suitable for me. He show actualy date every day, but not the date of the time, when I pushed the button...
TrowaD
Nov 8, 2012 at 09:21 AM
- Posts
- 2886
- Registration date
- Sunday September 12, 2010
- Status
- Moderator
- Last seen
- June 27, 2022
Nov 8, 2012 at 09:21 AM
Hi DaliaPerlai,
Not clear to me what you mean by "Date of the time".
Do you want to display time only or date only or both?
Or do you mean that you want to keep the date and don't want it to change once it is entered?
In case of the last use this:
Trowa
Not clear to me what you mean by "Date of the time".
Do you want to display time only or date only or both?
Or do you mean that you want to keep the date and don't want it to change once it is entered?
In case of the last use this:
Range("A1").Value = DateBest regards,
Trowa
TrowaD
Nov 8, 2012 at 10:44 AM
- Posts
- 2886
- Registration date
- Sunday September 12, 2010
- Status
- Moderator
- Last seen
- June 27, 2022
Nov 8, 2012 at 10:44 AM
That is exactly what "Range("A1").Value = Date" does.
Why is it not suitable for you?
Why is it not suitable for you?