Forum Discussion
adjust my data
i have mix data with dates and stock names but i want to adjust my data like what i show in picture. and i have huge amount of data. i just want to adjust my data date wise.
4 Replies
- himanshujoshi2211Copper Contributor
you can see this,from A17 date is same ok but after A17 date is change. so i have huge data and many dates like this so want complite row blank beetwen every date change. and how change i want that is i also i show in previews scrennshot. and ignore my spellings mistakes.
- SergeiBaklanDiamond Contributor
Here are few ways, with and without VBA
excel - How to automatically insert a blank row after a group of data - Stack Overflow
- OliverScheurichGold Contributor
Sub adjust()
Dim i As Long, j As Long
i = Range("A" & Rows.Count).End(xlUp).Row
For j = i To 2 Step -1
If Cells(j, 1).Value = Cells(j - 1, 1).Value Then
Else
Rows(j).InsertEnd If
Next j
End Sub
You can run this macro which should return the intended result. The assumption is that the data is sorted by the dates in column A before running the macro.
- FatManFluffBrass Contributor
Not sure if I understand your question exactly but I think your saying that you want to format your date to be in the format you're showing on the screenshot if so:
- Hightlight all cells that contain that dates
- Right click --> format cells (or CTRL+1)
- In numbers tab clcik on Custom on the left
- Set your type to DD-MM-YYYY
- Hit ok
Hope this is what you mean 👍