skull_eagle
Board Regular
- Joined
- Mar 25, 2011
- Messages
- 89
Hi,
Column P is in "dd/mm/yyy hh:mm" format, I need to split this into 2 columns one with the date the other with the time, using the below array splits the data but turns the values into text (even though the format is defined) which are useless to run formulas against.
Any assistance would be greatly appreciated
Thanks
Column P is in "dd/mm/yyy hh:mm" format, I need to split this into 2 columns one with the date the other with the time, using the below array splits the data but turns the values into text (even though the format is defined) which are useless to run formulas against.
Any assistance would be greatly appreciated
Code:
Range("Q1").Select
[color=darkblue]Dim[/color] b [color=darkblue]As[/color] [color=darkblue]Long[/color]
Row = b
Column = 16
[color=darkblue]Do[/color]
ActiveCell.FormulaR1C1 = "=TEXT(RC[-1],""dd/mm/yyyy"")"
ActiveCell.Offset(1, 0).Select
b = b + 1
[color=darkblue]Loop[/color] [color=darkblue]Until[/color] Cells(b, Column).Value = ""
Range("R1").Select
[color=darkblue]Dim[/color] c [color=darkblue]As[/color] [color=darkblue]Long[/color]
Row = c
Column = 16
[color=darkblue]Do[/color]
ActiveCell.FormulaR1C1 = "=TEXT(RC[-2],""hh:mm"")"
ActiveCell.Offset(1, 0).Select
c = c + 1
[color=darkblue]Loop[/color] [color=darkblue]Until[/color] Cells(c, Column).Value = ""
Thanks