I have an array with 5 columns and variable rows. I am using Vlookup, which works for the array I have, with 5 columns and 13 rows.
The code is as follows:
SUB macro1()
Range("F2").select
activecell.formulaR1C1="=IFERROR(Vlookup(RC[-1],R2C1:R13C5,4,FALSE),0)"
Range("F2").select
Selection Autofill Destination:=Range("F2:F13",Type:=xlFillDefault
Range("F2:F13").select
end sub
However the rows are variable.
I would be very grateful if someone could tell me how to do this for any number of rows
Thanks in advance for any ideas
The code is as follows:
SUB macro1()
Range("F2").select
activecell.formulaR1C1="=IFERROR(Vlookup(RC[-1],R2C1:R13C5,4,FALSE),0)"
Range("F2").select
Selection Autofill Destination:=Range("F2:F13",Type:=xlFillDefault
Range("F2:F13").select
end sub
However the rows are variable.
I would be very grateful if someone could tell me how to do this for any number of rows
Thanks in advance for any ideas