Hi,

This is day 3 of me learning VBA and I am trying to learn it by doing practical work.

So I started writing a macro for a sheet called "MealCal", once I had it working on that sheet, I then decided I needed to run it from another sheet called "Meal Schedule" because that sheet will pull the data results from the sheet called "MealCal" via vlookup and give us a nice summary.

MY problem is when I started running it from the sheet "Meal Schedule" it does not paste the first row of Sheets("14 Room 09-14") into A1 of sheet "MealCal" instead is pastes it in from row A6 down and the next column again starts from row B6.

BUT when I run the macro from "MealCal" it starts at the top at A1.

I have got a problem with understanding referring to active sheet yet working from another sheet, Please could you help me with the code below. The code starts pasting in row6 of sheet "MealCal" from the second last line in the below code.

Sub MealCal()
Dim lastrow As Long
Dim LastCol As Long
Dim srcLastRow As Long
Dim Finalrow As Long

 Set currentsheet = Worksheets("MealCal")

    lastrow = Range("A" & currentsheet.Rows.Count).End(xlUp).Row
    LastCol = Range("A1").End(xlToRight).Column

    ' find out how many rows there are in the source sheet
    srcLastRow = Sheets("14 Room 09-14").Range("D" & Sheets("14 Room 09-14").Rows.Count).End(xlUp).Row
    
    ' copy from the 14 room sheet to the currentSheet "mealcal" in the range specified
    Sheets("14 Room 09-14").Range("D1:" & "D" & srcLastRow).Copy Destination:=currentsheet.Range("A" & lastrow)
    Sheets("14 Room 09-14").Range("F1").Copy Destination:=currentsheet.Range("B" & lastrow)