rollingzep
Board Regular
- Joined
- Nov 18, 2013
- Messages
- 214
- Office Version
- 365
- Platform
- Windows
Hi,
<p>
I have a vlookup between two worksheets.
It is as follows
ws.Range("AU2:AU" & ws.Cells(Rows.Count, "Y").End(xlUp).Row).FormulaR1C1 = "=VLOOKUP(""*""&RC[-22]&""*"",HQLA!C1:C35,35,0)"
How do I modify the above, so that if the length of col, Y is 9, then it will be the above formula or
if the length is 12, then it should be
ws.Range("AU2:AU" & ws.Cells(Rows.Count, "Y").End(xlUp).Row).FormulaR1C1 = "=IFERROR(VLOOKUP(""*""&RC[-22]&""*"",HQLA!C3:C33,33,0)
</p>
<p>
I have a vlookup between two worksheets.
It is as follows
ws.Range("AU2:AU" & ws.Cells(Rows.Count, "Y").End(xlUp).Row).FormulaR1C1 = "=VLOOKUP(""*""&RC[-22]&""*"",HQLA!C1:C35,35,0)"
How do I modify the above, so that if the length of col, Y is 9, then it will be the above formula or
if the length is 12, then it should be
ws.Range("AU2:AU" & ws.Cells(Rows.Count, "Y").End(xlUp).Row).FormulaR1C1 = "=IFERROR(VLOOKUP(""*""&RC[-22]&""*"",HQLA!C3:C33,33,0)
</p>