Look in range to find last row then import cell from another sheet in cell on that last row

bdouglas1011

New Member
Joined
Jul 28, 2014
Messages
38
I have to sheet call it sheet1 & Sheet2.
Sheet1 has Cells B17 & B18 I need to place onto sheet 2.
Sheet2 has range with data in it D17:D367 - find the last row with data in that range (It changes daily) and on that row
Place Sheet(1) (B17) in (K) column of last row on Sheet2
Place Sheet(1) (B18) in (L) column of last row on Sheet2

Hope I explained it OK
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
I have tried to do almost the same as my earlier post but it did not execute properly.
it is grabbing the data and putting it on the correct sheet but not on the correct row unless I run the macro twice.
the first time I run it the data gets inputted into row(14) not the last row in the range it was supposed to select but if I run it again it does put it in the correct last row.

VBA Code:
 Dim RunNo   
    Surveys.Range("D368").End(xlUp).Select
    i = ActiveCell.row
    RunNo = Sheet27.Range("B11").Value
    cells(i, 2).Value = RunNo
 
Upvote 0
solution that works for now
VBA Code:
 Range("D367").End(xlUp).Select
                        b = ActiveCell.row
                        AB = Sheet27.Range("B17").Value
                        LR = Sheet27.Range("B18").Value
                        SS = Sheet27.Range("B12").Value
                        
                        cells(b, 11).Value = AB
                        cells(b, 12).Value = LR
                        cells(b, 21).Value = SS
 
Upvote 0
Solution

Forum statistics

Threads
1,214,869
Messages
6,122,012
Members
449,060
Latest member
LinusJE

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