|
|
Thread Tools | Display Modes |
#6
|
|||
|
|||
... and that way it works with the closed source (you will have to adjust strPath):
Code:
Sub Get_DataOfClosedWB() Dim lngCol As Long Dim lngMonth As Long Dim lngStart As Long Dim strformula As String Const strPath As String = "H:\Excel-Forum-temp-MSEnglish\" Const strCellRef As String = "$F$6" With ActiveSheet lngStart = .Cells(2, 1).Value lngMonth = Month(.Cells(2, 1).Value) Do While Month(lngStart + lngCol) = lngMonth 'Insert formula .Cells(2, lngCol + 2).Formula = "='" & strPath & "[Source WKB.xlsx]" & Format(lngStart + lngCol, "DD.MM.YY") & "'!" & strCellRef lngCol = lngCol + 1 Loop End With End Sub |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
I need to add multiple values based on multiple criteria in a cell not sure what to do | AUHAMM | Excel | 3 | 10-27-2014 09:11 PM |
Reporting Values Between Sheets/Tabs | jjbNana | Excel | 3 | 10-06-2011 10:28 PM |
How to count multiple values in a single cell, except zero? | iuliandonici | Excel | 1 | 04-13-2011 09:45 PM |
Sum & difference between multiple values in a single cell | iuliandonici | Excel | 4 | 04-13-2011 09:27 PM |
How do I merge data from one sheet in a workbook out into multiple sheets | nolesca | Excel | 4 | 06-07-2010 08:13 AM |