Created
March 13, 2017 00:42
-
-
Save gtaing1/76eaa353802c5cc0d60c9eeab1788982 to your computer and use it in GitHub Desktop.
GetPrismaID1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub getPrismaID_1() | |
Dim sourceWB As Workbook | |
Set sourceWB = ActiveWorkbook | |
Dim sourceWS As Worksheet | |
Set sourceWS = sourceWB.Sheets("Creative Direction | Media Plan") | |
'Innovid Bried Range | |
Dim BigID As Range | |
'Set BigID = sourceWS.Range("D7" & LastRow) | |
Dim Matching As Range | |
Set Matching = sourceWS.Range("F7" & LastRow) | |
Dim LastRow As Long | |
LastRow = Cells(Rows.Count, 2).End(xlUp).Row | |
'Campaign Export Range | |
Dim PlacementIDrng As Range | |
'Set PlacementIDrng = sourceWS.Range("D2:D") | |
Set PlacementIDrng = [getFileName].Worksheets("Campaign Spreadsheet").Range("D2" & LastRow) | |
Dim PlacementIDvalue As String | |
Dim PlacementID As String | |
Dim strPath As String | |
Dim Indexing As Variant | |
'open the file | |
strPath = Application.GetOpenFilename(FileFilter:="Excel Files (*.XLS), *.XLS", Title:="Select File To Be Opened") | |
If strPath <> "" Then getFileName = StrReverse(Split(StrReverse(strPath), "\")(0)) | |
'Set Indexing = Workbooks([getFileName]).Worksheets("Campaign Spreadsheet").Range("A2") | |
'Set Indexing = Workbooks([getFileName]).Worksheets("Campaign Spreadsheet").Range("R2") | |
Set Indexing = Workbooks([getFileName]).Sheets("Campaign Spreadsheet").Range("R2" & LastRow) | |
'BigID.Value = Application.WorksheetFunction.Index(Indexing,Application.WorksheetFunction.Match(PlacementIDvalue,mathing,0) | |
'MsgBox Indexing | |
Range("F7:F" & LastRow).FormulaR1C1 = "Index" | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment