Jacko23, You can do it like this:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GUIListView.au3>
Global $aData[4] = ["2014-03-09|456|201|3|0.45%|$2.94|$0.7654", "2014-03-08|236|231|2|0.65%|$1.25|$1.4321", _
"2014-03-07|566|341|1|0.75%|$4.62|$0.4567", "2014-03-06|786|561|3|0.95%|$6.48|$0.8765"]
Global $fSortSense = False ; Set initial ascending sort
$hGUI = GUICreate("Test", 500, 500)
$cListView = GUICtrlCreateListView("", 10, 10, 480, 400)
_GUICtrlListView_AddColumn($cListView, "Date", 80)
_GUICtrlListView_AddColumn($cListView, "Requests", 80)
_GUICtrlListView_AddColumn($cListView, "Impressions", 80)
_GUICtrlListView_AddColumn($cListView, "Clicks")
_GUICtrlListView_AddColumn($cListView, "CTR")
_GUICtrlListView_AddColumn($cListView, "eCPM")
_GUICtrlListView_AddColumn($cListView, "Earnings", 80)
For $i = 0 To 3
GUICtrlCreateListViewItem($aData[$i], $cListView)
Next
GUISetState()
GUIRegisterMsg($WM_NOTIFY, "_WM_NOTIFY")
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func _WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam)
#forceref $hWnd, $iMsg, $wParam
$tNMHDR = DllStructCreate($tagNMHDR, $lParam)
$iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
$iCode = DllStructGetData($tNMHDR, "Code")
Switch $iIDFrom
Case $cListView
Switch $iCode
Case $LVN_COLUMNCLICK ; A column was clicked
$tInfo = DllStructCreate($tagNMLISTVIEW, $lParam)
_GUICtrlListView_SimpleSort($cListView, $fSortSense, DllStructGetData($tInfo, "SubItem"))
EndSwitch
EndSwitch
EndFunc
M23