I have problems implementing a VBA code using "Range":
I'm using 2 sheets. The first one is "Import" and the other "Data", where I'm using the data from "Import", using different formulas in order to edit/filter my data. The data from the "Import" sheet changes weekly, so the number of rows (5000-10000 rows).
I put the Range until 10000, to always cover my data, but when the rows are under 10000, it places N/A on the cells, which has to be deleted every time.
This is what I use on the "Data" sheet (each column from Data imports other column from Import):
Range("A2:A10000").Formula = "='Import'!RC"
Range("B2:B10000").Formula = "=VLOOKUP(RC[-1],'Import'!R1C[-1]:R10000C[43],45,FALSE)"`
Is there any way to make the Range see how many rows are on each column on "Import", so I can avoid all the N/A?