How to autofill with non consecutive data
Closed
Rich
-
31 May 2010 à 08:49
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 - 31 May 2010 à 12:37
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 - 31 May 2010 à 12:37
Related:
- How to autofill with non consecutive data
- Autofill safari - Guide
- Chrome clear autofill - Guide
- How to copy data from one excel sheet to another - Guide
- Tmobile data check - Guide
- How to reinstall windows 10 without losing data - Guide
1 response
rizvisa1
Posts
4478
Registration date
Thursday 28 January 2010
Status
Contributor
Last seen
5 May 2022
766
31 May 2010 à 12:37
31 May 2010 à 12:37
You can try to use a macro for that
Sub FillDown()
Dim lMaxRows As Long
Dim lRow As Long
' find max number of rows
lMaxRows = Cells.Find("*", Cells(1, 1), SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
' start from row 2 till end of rows
For lRow = 2 To lMaxRows
' if the current cell is blank, then put the value of the cell above
If Cells(lRow, "A") = "" Then Cells(lRow, "A") = Cells(lRow - 1, "A")
Next lRow
End Sub