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.
I was lucky enough to receive some assistance from this forum previously, and here is the code that I have used:
Sub TransferBetweenSheets()
Dim shtName As String, MthRng As Range, LngNR As Long
shtName = Sheets(1).Range("C2").Value
With Sheets(shtName)
Set MthRng = .Rows(4).Cells.Find(Sheets(1).Range("C3").Value).Offset(1, 0)
Debug.Print MthRng.Address
Set MthRng = .Cells(MthRng.Row + 10000, MthRng.Column).End(xlUp).Offset(1, 0)
Debug.Print MthRng.Address
Set MthRng = MthRng.Resize(6, 1)
MthRng.Cells.Value = Sheets(1).Range("C5:C10").Cells.Value
Debug.Print MthRng.Address
End With
End Sub
I need to make all of the white cells in the ‘updater’ sheet send their data to their corresponding locations on the ‘Kramers’ sheet (these are highlighted blue).
I also need the grey cells to the right of this data to be transferred to their corresponding locations (next to column c’s data in the ‘Kramers’ worksheet).
I understand that this is a complicated task. I have attached the workbook that I am using and I would be very grateful if someone could help me make this macro functional. I previously posted a message in this forum but I don’t think I explained the situation well enough.
Thanks,
Jacob
Bookmarks