Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Enter a formula string in Excel VBA (division)

Posted on 2014-01-16
2
Medium Priority
?
714 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
2 Comments
 
LVL 28

Assisted Solution

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

Open in new window

0
 
LVL 53

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

963 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