I have a problem to flip data in vertical column (not in ascending/descending order)
Currently the lottery results on the link below are shown with the latest lotto draw results to appear at the top of the table.
I want to flip the vertical column of data with the latest lotto draw results to show at the bottom, how can this be done?
http://www.alllotto.com/Washington-Hit-5-Dec-2015-Lottery-Results.php
I understand it can be done in MS Office 2013 with "flip vertically" from its ribbon menu but I want to do it in OpenOffice.
The macro below asterisks is from http://www.extendoffice.com/documents/excel/712-excel-flip-column.html
My question is - do you have a way to run the macro below in OpenOffice so that we can flip numerical data vertically?
Please reply
Thanks
matu
*************************************************************************************************************************************
Flip a column of data order in Excel with VBA
If you know how to use a VBA code in Excel, you may flip / reverse data order vertically as follows:
Step 1: Hold down the Alt + F11 keys in Excel, and it opens the Microsoft Visual Basic for Applications window.
Step 2: Click Insert > Module, and paste the following macro in the Module Window.
VBA: Flip / reverse a range data order vertically in Excel.
Code: Select all
Sub FlipColumns()
'Updateby20131126
Dim Rng As Range
Dim WorkRng As Range
Dim Arr As Variant
Dim i As Integer, j As Integer, k As Integer
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
Arr = WorkRng.Formula
For j = 1 To UBound(Arr, 2)
k = UBound(Arr, 1)
For i = 1 To UBound(Arr, 1) / 2
xTemp = Arr(i, j)
Arr(i, j) = Arr(k, j)
Arr(k, j) = xTemp
k = k - 1
Next
Next
WorkRng.Formula = Arr
End Sub