Excel macro problem, transferring data to designated sheets based on conditions

yall003

New Member
Joined
Jul 1, 2011
Messages
2
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-com:office:office" /><o:p></o:p>
Sub TransferBetweenSheets()<o:p></o:p>
Dim shtName As String, MthRng As Range, LngNR As Long<o:p></o:p>
<o:p></o:p>
shtName = Sheets(1).Range("C2").Value<o:p></o:p>
With Sheets(shtName)<o:p></o:p>
Set MthRng = .Rows(4).Cells.Find(Sheets(1).Range("C3").Value).Offset(1, 0)<o:p></o:p>
Debug.Print MthRng.Address<o:p></o:p>
Set MthRng = .Cells(MthRng.Row + 10000, MthRng.Column).End(xlUp).Offset(1, 0)<o:p></o:p>
Debug.Print MthRng.Address<o:p></o:p>
Set MthRng = MthRng.Resize(6, 1)<o:p></o:p>
MthRng.Cells.Value = Sheets(1).Range("C5:C10").Cells.Value<o:p></o:p>
Debug.Print MthRng.Address<o:p></o:p>
End With<o:p></o:p>
<o:p></o:p>
End Sub
<o:p> </o:p>
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:p> </o:p>
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:p> </o:p>
Thanks,
<o:p> </o:p>
Jacob
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,224,518
Messages
6,179,256
Members
452,901
Latest member
LisaGo

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
Back
Top