Hi,
I've got dates in column A in dd/mm/yyyy format and I need to extract the month number in mmm format in column H vba. I've used the following code to get the date into column H but cannot get it in mmm format.
The reason I need to do this is each month bank statement data will be pasted into a tab and based on the month selected on the control sheet, the transactions for that particular month will be split between payments and receipt and moved to tabs called "payments" and "receipts" respectively. I was going to use the above code to extract the month from the date and based on what month is selected in the control sheet, write coding to pick up a transaction, work out if it is a payment and receipt and then move it. If there is a better way I can do this, that would help.
I've got dates in column A in dd/mm/yyyy format and I need to extract the month number in mmm format in column H vba. I've used the following code to get the date into column H but cannot get it in mmm format.
Dim y As Integer
On Error Resume Next
For y = 1 To 10
If Not Cells(y, 1) = "Date" And Cells(y, 8) = "" Then
Cells(y, 8).Select
ActiveCell.Value = Cells(y, 1)
The reason I need to do this is each month bank statement data will be pasted into a tab and based on the month selected on the control sheet, the transactions for that particular month will be split between payments and receipt and moved to tabs called "payments" and "receipts" respectively. I was going to use the above code to extract the month from the date and based on what month is selected in the control sheet, write coding to pick up a transaction, work out if it is a payment and receipt and then move it. If there is a better way I can do this, that would help.