Excel macro to copy cell I4 to active cell
Closed
CS Macro
-
Oct 6, 2011 at 08:30 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Oct 27, 2011 at 09:27 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Oct 27, 2011 at 09:27 AM
Related:
- Excel macro to copy cell I4 to active cell
- Number to words in excel - Guide
- Excel macro to create new sheet based on value in cells - Guide
- Excel send value to another cell - Guide
- Excel formula to subtract one cell from another - Excel Forum
- How to take screenshot in excel - Guide
3 responses
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Oct 6, 2011 at 09:43 AM
Oct 6, 2011 at 09:43 AM
Hi CS Macro,
Absolute and relative cell references.
When writing a function it is automatically a relative cell reference. Meaning that when you drag the cell, the cell reference will change.
Putting a $ sign in front of the column letter makes it absolute. Meaning that when you drag the cell to the right, the column letter will not change.
Same goes for putting a $ sign in front of the row number.
You can toggle between the available cell references by hitting F4.
Hope that make sense.
To achieve what you want you don't have to think about absolute and relative cell references.
Just use this macro:
Best regards,
Trowa
Absolute and relative cell references.
When writing a function it is automatically a relative cell reference. Meaning that when you drag the cell, the cell reference will change.
Putting a $ sign in front of the column letter makes it absolute. Meaning that when you drag the cell to the right, the column letter will not change.
Same goes for putting a $ sign in front of the row number.
You can toggle between the available cell references by hitting F4.
Hope that make sense.
To achieve what you want you don't have to think about absolute and relative cell references.
Just use this macro:
Sub test() Dim x As Integer x = InputBox("Which row to copy to?") Range("I4").Copy Cells(x, 9) Application.CutCopyMode = False End Sub
Best regards,
Trowa
TrowaD,
Please can you repost your response as for some reason I can't read it?
Many Thanks for your help.
Please can you repost your response as for some reason I can't read it?
Many Thanks for your help.
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Oct 10, 2011 at 08:48 AM
Oct 10, 2011 at 08:48 AM
Strange, but here is my message:
Hi CS Macro,
Absolute and relative cell references.
When writing a function it is automatically a relative cell reference. Meaning that when you drag the cell, the cell reference will change.
Putting a $ sign in front of the column letter makes it absolute. Meaning that when you drag the cell to the right, the column letter will not change.
Same goes for putting a $ sign in front of the row number.
You can toggle between the available cell references by hitting F4.
Hope that make sense.
To achieve what you want you don't have to think about absolute and relative cell references.
Just use this macro:
Best regards,
Trowa
Hi CS Macro,
Absolute and relative cell references.
When writing a function it is automatically a relative cell reference. Meaning that when you drag the cell, the cell reference will change.
Putting a $ sign in front of the column letter makes it absolute. Meaning that when you drag the cell to the right, the column letter will not change.
Same goes for putting a $ sign in front of the row number.
You can toggle between the available cell references by hitting F4.
Hope that make sense.
To achieve what you want you don't have to think about absolute and relative cell references.
Just use this macro:
Sub test() Dim x As Integer x = InputBox("Which row to copy to?") Range("I4").Copy Cells(x, 9) Application.CutCopyMode = False End Sub
Best regards,
Trowa
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Oct 27, 2011 at 09:27 AM
Oct 27, 2011 at 09:27 AM
Sure thing CS Macro,
The macro will then look like this:
Best regards,
Trowa
The macro will then look like this:
Sub test() Range("I4").Copy Destination:=ActiveCell End Sub
Best regards,
Trowa
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Oct 10, 2011 at 09:57 AM
Oct 10, 2011 at 09:57 AM
I just learned that non-members can't see comments (thanks Aquarelle), so this message is a "reply", which you should be able to see.
Hi CS Macro,
Absolute and relative cell references.
When writing a function it is automatically a relative cell reference. Meaning that when you drag the cell, the cell reference will change.
Putting a $ sign in front of the column letter makes it absolute. Meaning that when you drag the cell to the right, the column letter will not change.
Same goes for putting a $ sign in front of the row number.
You can toggle between the available cell references by hitting F4.
Hope that make sense.
To achieve what you want you don't have to think about absolute and relative cell references.
Just use this macro:
Best regards,
Trowa
Hi CS Macro,
Absolute and relative cell references.
When writing a function it is automatically a relative cell reference. Meaning that when you drag the cell, the cell reference will change.
Putting a $ sign in front of the column letter makes it absolute. Meaning that when you drag the cell to the right, the column letter will not change.
Same goes for putting a $ sign in front of the row number.
You can toggle between the available cell references by hitting F4.
Hope that make sense.
To achieve what you want you don't have to think about absolute and relative cell references.
Just use this macro:
Sub test() Dim x As Integer x = InputBox("Which row to copy to?") Range("I4").Copy Cells(x, 9) Application.CutCopyMode = False End Sub
Best regards,
Trowa