Hello
I am trying to no avail to format the date in my workbook to read in the following format DD/MM/YY
At the moment it reads 30-Apr-2014
(See attached sheet) I need to change the date format of all the entries in Column I
Also I would like to add together the contents of cells M, N and P to the contents of other M,N and P to create one row only if they share the same number in column C
(Some of my transactions have been split up and I need to amalgamate them together and column C is their Invoice number)
Here is the code I have so far
Sub Step2()
'
' Step2 Macro
' Step 2 Westminster Purchase Invoice Import
'
'
Cells.Select
ActiveWorkbook.Worksheets("Sheet3").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sheet3").Sort.SortFields.Add Key:=Range("A1:A253") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("Sheet3").Sort.SortFields.Add Key:=Range("C1:C253") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Sheet3").Sort
.SetRange Range("A1:S253")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
ActiveCell.Replace What:="Del/inv ", Replacement:="INV", LookAt:=xlWhole _
, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:="Invoice ", Replacement:="INV", LookAt:=xlWhole _
, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:="Ret/Crd ", Replacement:="CRN", LookAt:=xlWhole _
, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
I am trying to no avail to format the date in my workbook to read in the following format DD/MM/YY
At the moment it reads 30-Apr-2014
(See attached sheet) I need to change the date format of all the entries in Column I
Also I would like to add together the contents of cells M, N and P to the contents of other M,N and P to create one row only if they share the same number in column C
(Some of my transactions have been split up and I need to amalgamate them together and column C is their Invoice number)
Here is the code I have so far
Sub Step2()
'
' Step2 Macro
' Step 2 Westminster Purchase Invoice Import
'
'
Cells.Select
ActiveWorkbook.Worksheets("Sheet3").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sheet3").Sort.SortFields.Add Key:=Range("A1:A253") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets("Sheet3").Sort.SortFields.Add Key:=Range("C1:C253") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Sheet3").Sort
.SetRange Range("A1:S253")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
ActiveCell.Replace What:="Del/inv ", Replacement:="INV", LookAt:=xlWhole _
, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:="Invoice ", Replacement:="INV", LookAt:=xlWhole _
, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:="Ret/Crd ", Replacement:="CRN", LookAt:=xlWhole _
, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub