Anbuselvam
Board Regular
- Joined
- May 10, 2017
- Messages
- 97
Hi
I have recorded the macro to run the calculation steps as below.
Sub Run_Calc()'
' Run_Calc Macro
'
' Keyboard Shortcut: Ctrl+g
'
Range("S2:DK2").Select
Selection.Copy
Range("S8:DK10100").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Calculate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Calculate
Range("C7").Select
Selection.End(xlDown).Select
End Sub
By running the above macro, sheet got calculated S8 to DK10100.
My desired result is,
The above function should run only the number of rows I have selected instead of S8 to DK10100.
For Example, If I run the macro while selecting the Row number 500 to 550, Then it should calculate S500 to DK550 only.
How do I change them to get desired results?
Expecting positive reply. Thanks in Advance.
I have recorded the macro to run the calculation steps as below.
Sub Run_Calc()'
' Run_Calc Macro
'
' Keyboard Shortcut: Ctrl+g
'
Range("S2:DK2").Select
Selection.Copy
Range("S8:DK10100").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Calculate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Calculate
Range("C7").Select
Selection.End(xlDown).Select
End Sub
By running the above macro, sheet got calculated S8 to DK10100.
My desired result is,
The above function should run only the number of rows I have selected instead of S8 to DK10100.
For Example, If I run the macro while selecting the Row number 500 to 550, Then it should calculate S500 to DK550 only.
How do I change them to get desired results?
Expecting positive reply. Thanks in Advance.