I have the following code that keeps being displayed as "run time error 1004 for application or object defined error. Sub formula() Sheets("Depletions").Activate Range("G8:G156").formula = "=IF(IF(ISERROR(VLOOKUP(B8,'Banfi DA '!$D$5:$P$266,7,FALSE)),"",VLOOKUP(B8,'Banfi DA '!$D$5:$P$266,7,FALSE))=0,"",IF(ISERROR(VLOOKUP(B8,'Banfi DA '!$D$5:$P$266,7,FALSE)),"",VLOOKUP(B8,'Banfi DA '!$D$5:$P$266,7,FALSE)))" End Sub When I replace the formula with something more simple it works. I have also pasted this formula in excel and it gives me the desired result, but I can create the code. Could you please tellme what I am doing wrong. Thank you!
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.
Your password has been sent to:firstname.lastname@example.org
To follow this tag...
Thanks! We'll email you when relevant content is added and updated.
Share this item with your network: