Excel Autofill macro for different data cells
Closed
Mike
-
Aug 18, 2010 at 11:24 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Aug 20, 2010 at 08:17 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Aug 20, 2010 at 08:17 AM
Related:
- Excel Autofill macro for different data cells
- Transfer data from one excel worksheet to another automatically - Guide
- Excel apk for pc - Download - Spreadsheets
- Spell number in excel without macro - Guide
- Kernel for excel - Download - Backup and recovery
- Excel macro to create new sheet based on value in cells - Guide
1 response
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Aug 20, 2010 at 08:17 AM
Aug 20, 2010 at 08:17 AM
Try this
Sub FillUp() Dim lRow As Long Dim sLastValue As String lRow = 2 Do While Cells(lRow, 1) <> "" If (Cells(lRow, 2) <> "") Then sLastValue = Cells(lRow, 2) Else Cells(lRow, 2) = sLastValue End If lRow = lRow + 1 Loop End Sub