missing data in columns[empty cells]

  • Thread starter Thread starter ankud1
  • Start date Start date
A

ankud1

i m unable to progrm this problem as i m novice
i have data in some columns ,

one column have values in all rows [ say in row 1 to row 15] while
its adjacent column2 have some missing data [say in row 6 no data ]

so i want to chk from column 1 if in the 6th row data is present n in
colmn2 6th row data missing then
copy the data from row7 to row6 in column2

likewise in case of all columns where ever data is missing above
procedure left adjacet column shud b checked

hope some of u find time to help me out
waitng for ur replys

many thanx in advance
 
Select the range to fix (as many columns as you want)

Say B1:x1234 for example
Edit|Goto|special|check blanks
Notice that just the empty cells in that original selection are now selected.

Type an equal sign and hit the downarrow key (don't look at the screen!):

Hit ctrl-enter to fill the selected cells with a formula that points to the cell
directly below.

Now look at the screen.

You may want to select the original range and
edit|copy
edit|paste special|values

Debra Dalgleish explains how to do this:
http://contextures.com/xlDataEntry02.html

But her example uses the cell above (not below).

i m unable to progrm this problem as i m novice
i have data in some columns ,

one column have values in all rows [ say in row 1 to row 15] while
its adjacent column2 have some missing data [say in row 6 no data ]

so i want to chk from column 1 if in the 6th row data is present n in
colmn2 6th row data missing then
copy the data from row7 to row6 in column2

likewise in case of all columns where ever data is missing above
procedure left adjacet column shud b checked

hope some of u find time to help me out
waitng for ur replys

many thanx in advance
 
thanx Mr adve for ur reply

But My prblem is bit complex

i want to check value frm the adjacent column
i mean say i have data in colA and colB

so i want to check if there is empty cell in colA and also in colB at
same row then its fine(say 5th row is empty for both columns)then no
need to fil data there

but for example if columnA [7th row] is non-emty and columnB [7th row]
is emty then i want to apply the macro u suggested likewise check for
values in other rows too

http://contextures.com/xlDataEntry02.html
 
i have one idea to solve the problem but unable to program it in vba
hope sumbody wud help me out

the idea is

say we have values in column A & column B

for each r in my range
(columnA) [columnB]

if r.activecell.value <>"" and r.offset(0,1).value = "" then

call Sub FillColBlanks

else

move to next row and make it as active cell

Sub FillColBlanks()
'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
 
I don't understand the details.

Maybe it's time to rewrite the requirements.

And post a small example (as text in the message) of the data before and what it
should look like after.



thanx Mr adve for ur reply

But My prblem is bit complex

i want to check value frm the adjacent column
i mean say i have data in colA and colB

so i want to check if there is empty cell in colA and also in colB at
same row then its fine(say 5th row is empty for both columns)then no
need to fil data there

but for example if columnA [7th row] is non-emty and columnB [7th row]
is emty then i want to apply the macro u suggested likewise check for
values in other rows too

http://contextures.com/xlDataEntry02.html
 
Please keep the discussion in the newsgroup.

Since you're going to have to describe your problem in detail, you might as well
get lots of people to read it. Maybe someone will have a good idea.

Mr Dave
plz tell me ur email id i tried to send u an email on the id
[[email protected]]

but it was failure delivery
sory for trouble
but i gues u find some time
many thanx
 
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
 
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


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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top