Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Enter a formula string in Excel VBA (division)

Posted on 2014-01-16
2
Medium Priority
?
694 Views
Last Modified: 2014-01-16
Dear Experts:

I need to enter a formula into K71 as a string. The formula is as follows:

Range("J71") / Range("$B$6").

I got no idea how this works in Excel VBA.

Could somebody please help me with this?

Thank you very much in advance.

Regards, Andreas


strFormula = formula string?

ActiveWorkbook.Sheets("Evaluation").Range("K71").Formula = strFormula
0
Comment
Question by:AndreasHermle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

Assisted Solution

by:MacroShadow
MacroShadow earned 1000 total points
ID: 39786298
Range("K71").Formula = "=J71/$B$6" 

Open in new window

0
 
LVL 52

Accepted Solution

by:
Rgonzo1971 earned 1000 total points
ID: 39786300
Hi,

pls try

strFormula = "=J71/$B$6"
ActiveWorkbook.Sheets("Evaluation").Range("K71").Formula = strFormula

Open in new window

Regards
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question