Thread
:
missing data in columns[empty cells]
View Single Post
#
10
Posted to microsoft.public.excel.programming
Dave Peterson
external usenet poster
Posts: 35,218
missing data in columns[empty cells]
Maybe:
Option Explicit
Sub testme()
Dim LastRow As Long
Dim FirstRow As Long
Dim iRow As Long
With Worksheets("Sheet1")
FirstRow = 1
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For iRow = LastRow To FirstRow Step -1
If IsEmpty(.Cells(iRow, "A").Value) = False Then
If IsEmpty(.Cells(iRow, "B").Value) = True Then
.Cells(iRow, "B").Value = .Cells(iRow + 1, "b").Value
End If
End If
Next iRow
End With
End Sub
wrote:
hello Mr. Dave & everyone here is my Problem i M framing it again
ColA ColB
1 3
2 5
3
4 7
5 8
7 6
8 5
9
10 10
as menationed above i have data in two columns [no. of rows are
variable varies day by day]
so waht i want to da is to chk in colA if value is pressent
for instance ColA ,row3 "data present" while column B , row 3 "data
missing ",,,,,so i want to copy the value of ColB,Row4 in row3 of
ColmnB
and ColA , 6row empty so colB 6 row shud also remain empty
again ColA, 9row "data pressent" ,,,,,,,colB 9row "data missing" so
copy the value of ColB,Row10 in row9 of ColmnB
like wise check other rows of columnB
I m trying to write VBa program but havnt succeded ,,,hope sumbody
help me out.........
many thanx in advance
--
Dave Peterson
Reply With Quote
Dave Peterson
View Public Profile
Find all posts by Dave Peterson