Replace Row in Sheet 1 to Row in Sheet 2 by specific data in column A

Naphe

New Member
Joined
Mar 7, 2011
Messages
1
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.
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

cameron.richens

New Member
Joined
Nov 12, 2010
Messages
24
Have you tried using a combination of Vlookup (I often find it easyer to CONCATENATE the date an name to find specific items)

I often try to complicate things to much in excel and using something simple is often easier and faster.
 

Forum statistics

Threads
1,141,016
Messages
5,703,748
Members
421,312
Latest member
Mooncake1

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
Top