' To Test Function, Type some arbitrary values in range A1:E10, step through code in F8 Debug Mode in VB Editor, and examine Worksheet, Immediate Window ( Ctrl+G when in VB Editor ), hover over variables in the VB Editor Window with mouse cursor, set watches on variables ( Highlight any occurrence of a variable in the VB Editor and Hit Shift+F9 ) , etc.. and then you should expected the required Output to be pasted out starting Top Left at cell M17
Main Test Code ( Required Function given a couple of Posts down )
Code:' Delete One Row From A 2D Excel Range Area ' To Test Function, Type some arbitrary values in range A1:E10, step through code in F8 Debug Mode in VB Editor, and examine Worksheet, Immediate Window ( Ctrl+G when in VB Editor ), hover over variables in the VB Editor Window with mouse cursor, set watches on variables ( Highlight any occurrence of a variable in the VB Editor and Hit Shift+F9 ) , etc.. and then you should expected the required Output to be pasted out starting Top Left at cell M17 Sub Alan() Dim sp() As Variant 'Dim DataArr() As Variant: Let DataArr() = Range("A1:E10").Value Let sp() = FuR_Alan(Range("A1:E10"), 5) 'Let sp() = FuRSHg(Range("A1:E10"), 5) 'Let sp() = FuRSHgDotT(Range("A1:E10"), 5) 'Let sp() = FuRSHgShtHd(Range("A1:E10"), 5) Range("M17").Resize(UBound(sp(), 1), UBound(sp(), 2)).ClearContents Let Range("M17").Resize(UBound(sp(), 1), UBound(sp(), 2)) = sp() End Sub
_............
For no particular reason I am considering this as my Input "Area"
Using Excel 2007 32 bit
Row\Col A B C D E F1 0 10 20 30 40 2 2 12 22 32 42 3 4 14 24 34 44 4 6 16 26 36 46 5 8 18 28 38 48 6 10 20 30 40 50 7 12 22 32 42 52 8 14 24 34 44 54 9 16 26 36 46 56 10 18 28 38 48 58 11
Sheet: NPueyoGyanArraySlicing
_.......
Expected Output shown in next Post




Reply With Quote
Bookmarks