![]() |
|
|
|
#1
|
|||
|
|||
|
. Here is the updated macro : Code:
Option Explicit
Sub numcells()
Dim i As Integer
Dim x As Range
For Each x In Range("B5:B100") '<-- Edit range as required.
If IsNumeric(x.Offset(0, -1).Value) And x.Offset(0, -1).Value > 0 Then
i = x.Offset(0, -1).Value
End If
If x <> "" Then
If x.Offset(0, -1) = "" Then
x.Offset(0, -1) = i
i = i + 1
End If
End If
Next
End Sub
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Return Multiple values from data except blanks with two criteria
|
Marcia | Excel | 7 | 09-07-2018 12:38 AM |
Delete starting number *) and delete Unneeded data in series
|
frustrated teacher | Word VBA | 5 | 12-07-2014 06:53 PM |
Starting page numbering after initial pages
|
plradoff | Word | 3 | 02-15-2014 08:59 PM |
Copying data from sheet with deleted columns creates blanks
|
ZGreyArea | Excel | 1 | 11-20-2013 10:12 AM |
Page numbering starting on 2 after section break
|
pamm13 | Word | 1 | 06-22-2011 11:10 AM |