ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Refrencing cells using old Paste link method HELP! (https://www.excelbanter.com/excel-programming/317550-refrencing-cells-using-old-paste-link-method-help.html)

Rob

Refrencing cells using old Paste link method HELP!
 
I've tried to look for this answer everywhere but still can't find it.

I have a Workbook "REFER2004" that has Dates on the top row. All of these
dates are week ending dates on Fri. (ex. 11/19/04). My Columns are all linked
or have references to another workbook called "Weekly Form". On all the Sheet
Tabs they are labeled with "Week Ending 01.09.04" and so on for every
weekending date of the year. In all the Week Ending Sheets I need Rows &
Column L3 to L253 that have totals to come over under every date in the
Refer2004 Workbook and a couple other cells like B259, C259....... I have
been doing the old Pasting Link Method for the whole year now and don't want
to do this for next year too. Does any one have a better method or Script to
fill in these links automatically? I can email you an example copy of the
sheets if that helps.

Thanks in Advance,

Rob

Refrencing cells using old Paste link method HELP!
 

I did find this link a little helpful but still am lost to how I should set
this up.

<linkhttp://www.rondebruin.nl/tips.htm</link

Rob

Refrencing cells using old Paste link method HELP!
 
I'm thinking something like this might help me -- What do you think?
Copy a range of each sheet



This example use the function LastRow





Sub Test1()
Dim sh As Worksheet
Dim DestSh As Worksheet
Dim Last As Long



On Error Resume Next
If Len(ThisWorkbook.Worksheets.Item("Master").Name) = 0 Then
On Error GoTo 0
Application.ScreenUpdating = False
Set DestSh = Worksheets.Add
DestSh.Name = "Master"
For Each sh In ThisWorkbook.Worksheets
If sh.Name < DestSh.Name Then
Last = LastRow(DestSh)



sh.Range("A1:C5").Copy DestSh.Cells(Last + 1, "A")
'Instead of this line you can use the code below to copy
only the values
'or use the PasteSpecial option to paste the format also.


'With sh.Range("A1:C5")
'DestSh.Cells(Last + 1, "A").Resize(.Rows.Count, _
'.Columns.Count).Value = .Value
'End With


'sh.Range("A1:C5").Copy
'With DestSh.Cells(Last + 1, "A")
' .PasteSpecial xlPasteValues, , False, False
' .PasteSpecial xlPasteFormats, , False, False
' Application.CutCopyMode = False
'End With



DestSh.Cells(Last + 1, "D").Value = sh.Name
'This will copy the sheet name in the D column if you want



End If
Next
Cells(1).Select
Application.ScreenUpdating = True
Else
MsgBox "The sheet Master already exist"
End If
End Sub


All times are GMT +1. The time now is 02:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com