So I’m comfortble with Excel in general but never really used VBA other than small tweeks to existing macros.
But I’m stumped with this one. What I have is a Master file which needs to copy data from some 55 individual files. The below code works at coying over the data I want BUT in my Master file I have formula’s and it does seem to copy over the top of them.
So what I need is something that looks at a list of file names and then copies say rows 1,7,25:26 & 60 for example, from those files and puts them in the corrisponding tab name in a particular row, so that the formula’s inbetween remain intact.
Think I’ll get myself a VBA for dummies book to understand the code a bit further also…
Sub Consol()
With Application
.Calculation = xlManual
.MaxChange = 0.001
End With
Sheets(“Last”).Select
Range(“A1”).Select
Do
If ActiveCell = “” Then
Sheets(1).Select
Calculate
With Application
.Calculation = xlAutomatic
.MaxChange = 0.001
End With
End
Else
Sheet = ActiveCell.Value
RNAME = ActiveCell.Offset(1, 0)
Worksheets(Sheet).Range(“J15”).Consolidate _
sources:=RNAME, _
Function:=xlSum
ActiveCell.Offset(1, 0).Select
End If
Loop
End Sub