I asked a similar question before and was provided with some code by a couple of you, one of which I have now implemented and is working great
Dim wkbkSum As Workbook
Dim Val1 As Variant
Dim Val2 As Variant
Dim lngRow As Long
With ActiveSheet
If .Range("E22").Value <> "Annual" Then Exit Sub
Val1 = .Range("A16").Value
Val2 = .Range("A24").Value
End With
Set wkbkSum = Workbooks.Open("w:\maintenance\reference_files\clik_update_files\bfa_panel_type.xlsx")
With wkbkSum.Worksheets("Sheet1")
lngRow = .Cells(.Rows.Count, 1).End(xlUp).Row + 1
.Cells(lngRow, 1).Value = Val1
.Cells(lngRow, 2).Value = Val2
End With
wkbkSum.Close True
I wish to do something similar on a couple of other spreadsheets now. Basically I want to lift the values of 87 different fixed cells and drop them into a blank template in certain places.
e.g. ActiveSheet-Cell B$17$.value to always go to WorkbookName-Cell C$36$ etc.
As previously stated I have 80 + cells I need to do this on. Surely there is a way of doing this without having to declare each cell's value as a variable?
Any help greatfully appreciated as always
T
Toni Chaffin aka Talisa