database linking

pradyuthal

Board Regular
Joined
Jul 13, 2005
Messages
212
Code:
Sub foo()
    '   Copy Data to a recordset
    Dim LastRow As Range
    Dim i As Integer
        Set LastRow = Sheets("Sheet2").Cells(Rows.Count, "A").End(xlUp)
    
            For i = 1 To 5
                LastRow.Offset(1, i - 1) = ActiveSheet.Cells(1, i)
                ActiveSheet.Cells(1, i) = ""
            Next i
End Sub

I have the above code with the help of which I can only copy the entries from  the first row , but I want to copy entries made in cell a5 , b11 and d20 .

Please modify the above code to some extent so that I may be able to do my job .

Thanks in advance .
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,214,932
Messages
6,122,323
Members
449,077
Latest member
jmsotelo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top