Search copy & Paste Data

R

Rajkumar

Hi,

I am attaching a file named Search Copy & Paste.xls.

If you view the column A & B in sheet1,some datas will be missing.Now
want to have some function/macro to fill up these data's as given i
sheet2.

ie.,The function/macro should find the empty row & copy the last recor
& paste it till it finds another record/row with values.

I donot know if it is complex or easy one.but i had breaked my head o
this.

Note :Select column A1 in sheet1 & do ctrl+pgup/dwn for better clarity

+----------------------------------------------------------------
| Attachment filename: search copy & paste data.xls
|Download attachment: http://www.excelforum.com/attachment.php?postid=366300
+----------------------------------------------------------------
 
D

Don Guillett

Try this
Sub fillin()
Sheets("sheet1").Select 'to make sure

x = Cells(65536, 1).End(xlUp).Row
For Each c In Range("a4:a" & x)
If c = "" Then
c.Value = Sheets("sheet2").Range("c1:c1000"). _
Find(c.Offset(, 2)).Offset(, -2)
End If
Next
End Sub
 
D

Don Guillett

I just looked at this again and I made it more complicated than needed but
it works.
 
G

Gord Dibben

Rajkumar

Select column A and B.

Edit>Go To>Special>Blanks>OK

A and B column blanks will be highlighted. The top blank cell in A will be
active.

Type an = sign then point/click with mouse cursor on the cell above.

CRTL + ENTER will fill the blanks in A and B with data.

Gord Dibben XL2002
 

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

Top