![]() |
|
![]() |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]()
Hello,
Let me start by saying I am not an expert in VBA, but I have started to dabble as it makes life so much easier. Here is my predicament. I have one master data input sheet that is used to populate the fields of 23 separate (machine specific) sheets. Each of the machine specific sheets is identified by cell C5. In my master input sheet Cell B1 refers to that same value. So my question is, how can i write a macro that would copy a specific cell from sheet 1 (master input) and paste to a cell in its corresponding sheet. for example: Copy Sheet1 cell b5 paste into cell I80 of the sheet whos cell C5 = Sheet1's B1 I have a macro for printing the corresponding report based on that rule, but i do not know how to go about applying the same principal to copy and paste. Here is my print macro: Sub Test5() Dim sht As Worksheet For Each sht In ThisWorkbook.Worksheets If sht.Range("C5").Value = Sheet1.Range("B1") Then sht.PrintOut End If Next sht End Sub As you can see it calls to print the sheet whos C5 value equals that of sheet1's B1 value. I have tried many different things but I am completely stumped. If anyone could shed some light on the subject it would be greatly appreciated. |
#2
|
|||
|
|||
![]()
If I follow your description, try putting
Code:
sht.range("I80").value=Sheet1.Range(whatever).value Code:
sht.PrintOut |
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
copy checkbox string and paste it in excel sheet | MOHAMMEDSALMAN | Excel Programming | 7 | 10-29-2015 03:50 AM |
Excel copy two numbers between specific column and paste in next sheet | visha_1984 | Excel | 1 | 12-26-2014 07:59 PM |
Want to change Macro to copy and paste data to new sheet | Vortex69 | Excel Programming | 0 | 12-23-2014 09:53 PM |
![]() |
konopca | Word VBA | 5 | 02-20-2014 02:34 PM |
copy cell from sheet 2 to sheet 3 macro | slipperyjim | Excel Programming | 1 | 02-18-2010 01:31 AM |