Help with randomn blank cell in my data

J

Jayhawktc

I am needing to evaluate a column of data and if a cell in that colum
is blank I need to fill that cell with what is in the preceeding colum
but if there is a value in the cell just skip over it and move to th
next cell. Any help to get me going would be greatly appreciated.
Thanks in advance
 
A

Anne Troy

The best I can give you is to select that column, hit Edit-go to-special,
blanks, hit OK.
Now type a formula as if you would for the first blank cell (suppose it's C6
and you want to grab the data from C5, just type =C5.
Hit Ctrl+Enter to put the formula in all the selected cells.

<-*-><-*-><-*-><-*-><-*-><-*-><-*-><-*->
Hope this helps!
Anne Troy (better known as Dreamboat)
Author: Dreamboat on Word
Email: Dreamboat*at*Piersontech.com
Web: www.TheOfficeExperts.com
 
M

Mike Q.

Sub IfEmptyCopyLeftCell()

Range("B60000").End(xlUp).Offset(1, 0) = "END"
[B1].Select
Do While ActiveCell.Value <> "END"
If ActiveCell = ("") Then
ActiveCell.Offset(0, -1).Select
Selection.Copy Destination:=ActiveCell.Offset
(0, 1)
ActiveCell.Offset(1, 1).Select
Else
ActiveCell.Offset(1, 0).Range("A1").Select
End If
Loop
End Sub
 
D

David Prout

Run this Macro but save your data first to make sure it does what you want

Sub EvaluateRange()
LastCell = Range("B65536").End(xlUp).Offset(-1, 0).Address
Set MyRange = Range("B1", LastCell)
For Each MyCell In MyRange
If MyCell.Value = "" Then
MyCell.Value = MyCell.Offset(0, -1).Value
End If
Next MyCell

End Sub


DavidP
 
B

BrianB

How about another column with the formula :-
=IF(A2="",A1,A2)

You can then copy & Edit/Pastespecial/Values and delete the origina
column
 
Top