troubleshooting Question

Formula Insert using code in Excel

Avatar of fizzlefry
fizzlefry asked on
Microsoft OfficeProgrammingMicrosoft Excel
9 Comments1 Solution352 ViewsLast Modified:
I am trying to clean up an excel file using several lines of code; everything from cleaning up the headers to adding / deleting columns.  I am trying to insert a somewhat complex formula into a column, programatically.  Please see attached source file.  I inserted the code into a module in the background, but it keeps erroring out.  It's like my formula formatting is incorrect.  But if I manually insert the formula, it works fine.  I simply want to insert the formula in the first column where ANY data appears in column B.  I wasn't able to find the logic for the "where data appears in column B" part, but that's what I'm trying, however each time I try with the enclosed code, I get a compiler error.  What I ultimately need to do is attach the corresponding location (store) number to the line items, as that detail is only shown in a total line.  So if my formula needs to change, so be it.  But I can't seem to get it in there automatically.

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros