What i am trying to do is get a row of information (a student with the date of their last lesson, lessons remaining, and other data) from a weekly sheet (sheet1) to go into a full list of all students (sheet2). I want this to be tracked by student name so when they have a lesson for the week, the new information from sheet1 replaces the old information from sheet2. The sheets are set up identically.
I have been looking on various sites as i am new to macros and coding in excel, and i have not found anything anywhere that seems similar to what i am looking for.
I did find this code on this site that seemed close to what i am looking for, but it adds it to the bottom of the sheet, instead of replacing the row with the new data.
Code:
Sub FindTotal()
Sheets("Sheet2").Activate
lr = Cells(Rows.Count, 1).End(xlUp).Row + 1
Sheets("Sheet1").Activate
Set Rng = Range("a1:z" & Cells(Rows.Count, 1).End(xlUp).Row)
For Each cell In Rng
If cell.Value = "Total" Or cell.Value = "total" Then
cell.EntireRow.Copy Destination:=Worksheets("Sheet2").Range("A" & lr)
lr = lr + 1
End If
Next cell
End Sub
(Code Posted by rassten in another thread on this forum)
Is what i am asking way too complicated for me to figure out or is there a way to alter this code slightly to get the desired result.
If I am not making myself clear please request additional information, any help is appreciated.
I have been looking on various sites as i am new to macros and coding in excel, and i have not found anything anywhere that seems similar to what i am looking for.
I did find this code on this site that seemed close to what i am looking for, but it adds it to the bottom of the sheet, instead of replacing the row with the new data.
Code:
Sub FindTotal()
Sheets("Sheet2").Activate
lr = Cells(Rows.Count, 1).End(xlUp).Row + 1
Sheets("Sheet1").Activate
Set Rng = Range("a1:z" & Cells(Rows.Count, 1).End(xlUp).Row)
For Each cell In Rng
If cell.Value = "Total" Or cell.Value = "total" Then
cell.EntireRow.Copy Destination:=Worksheets("Sheet2").Range("A" & lr)
lr = lr + 1
End If
Next cell
End Sub
(Code Posted by rassten in another thread on this forum)
Is what i am asking way too complicated for me to figure out or is there a way to alter this code slightly to get the desired result.
If I am not making myself clear please request additional information, any help is appreciated.