Solved

Enter a formula string in Excel VBA (division)

Posted on 2014-01-16
2
677 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 250 total points
ID: 39786298
Range("K71").Formula = "=J71/$B$6" 

Open in new window

0
 
LVL 52

Accepted Solution

by:
Rgonzo1971 earned 250 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
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…

635 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