Question: 2. Create a VBA array function called ShiftVector(mg.n) with arguments for a range (mg) and n that will shift the elements of an (m x
2. Create a VBA array function called ShiftVector(mg.n) with arguments for a range (mg) and n that will shift the elements of an (m x 1) vector up by n rows. The first n rows of the range rng will wrap around and appear at the bottom of the resulting vector. IMPORTANT: Your array function should be capable of accommodating strings and data types other than just numbers. B 1-ShiftVector(A1:A9,3) 1 hey 1 2 hi 3 5 5 mo un 3 9 7 4 hey Ctrl-Shift-Enter 5 6 3 9 2 hi 3 4 hey 5 6 7 8 yo N 3 yo 9 7 hi 2 1 8 yo 9 un 2 5 Here is a flow chart that you can implement in your ShiftVector function: GTACT this will become input ho input Irng input count rows=nol n b(nr-n+1 nr) [6 (79)] this will become hey 3 9 yo - [6 (16)] tizlar-n) n. 3 NE b (1) = rng (itly output b/ iyar i-nr-n+1 END /b(i)= rnglions tn)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
