Macro Vlookup antoher book

vinzent

New Member
Joined
Feb 7, 2012
Messages
35
Office Version
  1. 365
Platform
  1. Windows
Sorry, mi English is poor, but a i try to explain

I have one file called "NewCommit", I need the dates from another file called OldCommit Column ShipDate (Column I).
These dates will be in the Column I in NewCommit

I have this code, but error message appears

Code:
[COLOR=#141414][FONT=Consolas]Sub abrirArchivo()[/FONT][/COLOR]
'open oldcommitstrArchivo = Application.GetOpenFilename( _        
FileFilter:="Excel Files (*.xlsx), *.xlsx", _        
FilterIndex:=1, _        Title:="Elegir Commit anterior")        
If strArchivo = False Then Exit Sub        
Workbooks.OpenText FileName:=strArchivo        
Application.ScreenUpdating = False'vlookupWindows("NewCommit.xlsx").ActivateDim LR As LongLR = Range("A" & Rows.Count).End(xlUp).Row    
Range("R1") = "Formula"    
Range("R2:R & LR").FormulaR1C1 = _        
"=VLOOKUP(RC[-3],[OldCommit.xlsx]Raw_Data!R1C1:R34C9,9,FALSE)" 
[COLOR=#141414][FONT=Consolas]End Sub[/FONT][/COLOR]

Thanks!
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,220,965
Messages
6,157,120
Members
451,399
Latest member
alchavar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top