And then, click OK button, and the data range has been reversed vertically as below screenshots shown:Ĭopy and paste a range of cells in reverse order horizontally
Then, press F5 key to run this code, and a prompt box is popped out to remind selecting the data range that you want to reverse vertically, see screenshot:Ĥ. Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)ģ. VBA code: Copy and paste a range of cells in reverse order vertically Sub Flipvertically()ĭim i As Integer, j As Integer, k As Integer
Click Insert > Module, and paste the following code in the Module Window. First, you should copy and paste your data into a new place, and then, hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.Ģ. Please do with the following steps: Copy and paste a list of column in reverse order verticallyġ. If you need to copy and paste a range of columns or rows in reverse order, here, I will introduce some VBA codes for solving it quickly and easily. If your data in row 10, you should change it to 10:10.Īnd then, drag the fill handle right to the cells that you want to apply this formula until all values extracted, and you will get all the values have been reversed horizontally, see screenshot:Ĭopy and paste a range of columns or rows in reverse order with VBA code Note: In the above formula, A1 is the first cell in the row, and 1:1 is the row number that your data located.