I have data in column with some blank cells I want to fill the bl.

S

S

hi
I got some data in a sheet with some blank cells so I wanted to fill the
blank cell which is in between without missing the order or using sort
 
F

Frank Kabel

Hi
- select the entire data range
- hit F5 and click 'Special'
- choose 'Empty cells'
- enter your value and hit CTRL+ENTER

--
Regards
Frank Kabel
Frankfurt, Germany

S said:
hi
I got some data in a sheet with some blank cells so I wanted to fill the
blank cell which is in between without missing the order or using
sort
 
G

Gord Dibben

Assuming you want what is above each blank cell placed into the blank cell.

Select the range to fill.

Edit>Go To>Special>Blanks>OK.

Blank cells will be selected.

Enter an = sign in active cell then point to cell above.

Hit CRTL + ENTER.

Copy>Paste Special(in place)>Values to get rid of the formulas.

OR use a macro....

Sub Fill_Blanks()
'by Dave Peterson 2004-01-06
'fill blank cells in column with value above
Dim wks As Worksheet
Dim rng As Range
Dim LastRow As Long
Dim col As Long

Set wks = ActiveSheet
With wks
col = ActiveCell.Column
'or
'col = .range("b1").column

Set rng = .UsedRange 'try to reset the lastcell
LastRow = .Cells.SpecialCells(xlCellTypeLastCell).Row
Set rng = Nothing
On Error Resume Next
Set rng = .Range(.Cells(2, col), .Cells(LastRow, col)) _
.Cells.SpecialCells(xlCellTypeBlanks)
On Error GoTo 0

If rng Is Nothing Then
MsgBox "No blanks found"
Exit Sub
Else
rng.FormulaR1C1 = "=R[-1]C"
End If

'replace formulas with values
With .Cells(1, col).EntireColumn
.Value = .Value
End With

End With

End Sub


Gord Dibben Excel MVP
 
Top