u002dag
asked on
VBA to Clear a Region and Then Perform Vlookups
Hi,
Can you help me to add VBA code to my macro to clear a region and then add a vlookup (equation) to cells.
Attached is a sample code. It's kind of spread-out but I deleted everything but the applicable portions. Need to Clear AU7 to AZ1000 and then have code to do what the vlookup functions do now, for each row for columns AV and AW:
=IF(ISBLANK(AA7),"",(VLOOK UP(AA7,$AE $7:$AF$107 ,2,FALSE)) )
=IF(ISBLANK(AB7),"",(VLOOK UP(AB7,$AI $7:$AJ$13, 2,FALSE)))
Thanks,
Dennis
EOS-Assistant-Experts-Exchange-t.xls
Can you help me to add VBA code to my macro to clear a region and then add a vlookup (equation) to cells.
Attached is a sample code. It's kind of spread-out but I deleted everything but the applicable portions. Need to Clear AU7 to AZ1000 and then have code to do what the vlookup functions do now, for each row for columns AV and AW:
=IF(ISBLANK(AA7),"",(VLOOK
=IF(ISBLANK(AB7),"",(VLOOK
Thanks,
Dennis
EOS-Assistant-Experts-Exchange-t.xls
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Two things. First, you're missing a closing bracket at the end, and, second, you need to double-up quotes in VBA:
Range("f7:f100").Formula = "=hyperlink(concatenate($al$5,am7,"".pdf""),AC7)"
ASKER
Do you know why I get a compile error: Syntax error when I use a similar approach for the following and how would you overcome it?:
Range("f7:f100").Formula = "=hyperlink(concatenate($a