Hi,
My problem is that I am trying to create a workbook that will send data from one main worksheet to other worksheets, depending on 2 criteria (one is the sheet name and one is the date).
So far I have a macro that will do the task that I have specified, but it will only send the data in order, arriving at the bottom of the column. It will not overwrite the existing data in the corresponding cells, which I need it to do.
Here is the code that I have used:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
Sub TransferBetweenSheets()<o></o>
Dim shtName As String, MthRng As Range, LngNR As Long<o></o>
<o></o>
shtName = Sheets(1).Range("C2").Value<o></o>
With Sheets(shtName)<o></o>
Set MthRng = .Rows(4).Cells.Find(Sheets(1).Range("C3").Value).Offset(1, 0)<o></o>
Debug.Print MthRng.Address<o></o>
Set MthRng = .Cells(MthRng.Row + 10000, MthRng.Column).End(xlUp).Offset(1, 0)<o></o>
Debug.Print MthRng.Address<o></o>
Set MthRng = MthRng.Resize(6, 1)<o></o>
MthRng.Cells.Value = Sheets(1).Range("C5:C10").Cells.Value<o></o>
Debug.Print MthRng.Address<o></o>
End With<o></o>
<o></o>
End Sub
<o> </o>
I need to make all of the white cells in the ‘updater’ sheet send their data to their corresponding locations in the receiving sheet (these are highlighted blue). Rather than just transferring in order, they need to search the name to their left, and then find this location in the other worksheet.
I also need the grey cells to the right of this data to be transferred to their corresponding locations (next to the original data where applicable).
<o> </o>
I understand that this is a complicated task. I would be very grateful if someone could help me make this macro functional. I am almost there, but lost on what to do next!
I would attach the file, but I believe it is against the forum rules. I can email it to someone if they would be willing to help me.
<o> </o>
Thanks,
<o> </o>
Jacob
My problem is that I am trying to create a workbook that will send data from one main worksheet to other worksheets, depending on 2 criteria (one is the sheet name and one is the date).
So far I have a macro that will do the task that I have specified, but it will only send the data in order, arriving at the bottom of the column. It will not overwrite the existing data in the corresponding cells, which I need it to do.
Here is the code that I have used:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
Sub TransferBetweenSheets()<o></o>
Dim shtName As String, MthRng As Range, LngNR As Long<o></o>
<o></o>
shtName = Sheets(1).Range("C2").Value<o></o>
With Sheets(shtName)<o></o>
Set MthRng = .Rows(4).Cells.Find(Sheets(1).Range("C3").Value).Offset(1, 0)<o></o>
Debug.Print MthRng.Address<o></o>
Set MthRng = .Cells(MthRng.Row + 10000, MthRng.Column).End(xlUp).Offset(1, 0)<o></o>
Debug.Print MthRng.Address<o></o>
Set MthRng = MthRng.Resize(6, 1)<o></o>
MthRng.Cells.Value = Sheets(1).Range("C5:C10").Cells.Value<o></o>
Debug.Print MthRng.Address<o></o>
End With<o></o>
<o></o>
End Sub
<o> </o>
I need to make all of the white cells in the ‘updater’ sheet send their data to their corresponding locations in the receiving sheet (these are highlighted blue). Rather than just transferring in order, they need to search the name to their left, and then find this location in the other worksheet.
I also need the grey cells to the right of this data to be transferred to their corresponding locations (next to the original data where applicable).
<o> </o>
I understand that this is a complicated task. I would be very grateful if someone could help me make this macro functional. I am almost there, but lost on what to do next!
I would attach the file, but I believe it is against the forum rules. I can email it to someone if they would be willing to help me.
<o> </o>
Thanks,
<o> </o>
Jacob