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
Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
Quoting entire posts clutters the forum and makes threads hard to read !
If you are pleased with a member's answer then use the Star icon to rate it
Click here to see forum rules
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks