Chirag R Raval
Member
Dear All Experts,
on previously subtotalled range , macro already record all steps of selection this range , but if run that recorded macro , fail to select subtotalled range.
each steps images attached
step 1- normally select first row till A1 to F1
step 2-activate E1 (just press enter key 5 times)
Step-3 Just constantly pressed "Shift" key & press & release "End" key & press and release "Down Arrow" key result as below
step 4 just run recorded macro.
its just stop selection at total of that column, instead of till end of data.
I may times try as per below code , used with end with, with selection , but all time fail
to select this whole subtotalled range .
wondering that , if manually (key combinations) successful done, but
as per VBA its all time fail..
I just want that range to convert named range code is below. this is a part of big macro
how to just select subtotalled all range?
regards,
Chirag Raval
on previously subtotalled range , macro already record all steps of selection this range , but if run that recorded macro , fail to select subtotalled range.
each steps images attached
step 1- normally select first row till A1 to F1
step 2-activate E1 (just press enter key 5 times)
Step-3 Just constantly pressed "Shift" key & press & release "End" key & press and release "Down Arrow" key result as below
step 4 just run recorded macro.
its just stop selection at total of that column, instead of till end of data.
I may times try as per below code , used with end with, with selection , but all time fail
to select this whole subtotalled range .
wondering that , if manually (key combinations) successful done, but
as per VBA its all time fail..
I just want that range to convert named range code is below. this is a part of big macro
Code:
sub ShrtMonthlyReport ()
Dim mymainrng As Range
ActiveSheet.Range("a1", ActiveSheet.Range("A1").End(xlToRight)).Select
Selection.Cells(1, 5).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Columns(5).Select
ActiveWorkbook.Names.Add Name:="MyMainRng", RefersTo:=Selection
Application.Goto Reference:=ActiveWorkbook.Names("MyMainRng").Name
how to just select subtotalled all range?
regards,
Chirag Raval