Wednesday 15 April 2015

excel - Including text with quotes within a formula in VBA -


I have a button coded in VBA to reset a spreadsheet with the following line: -

  range ("F6") = "= if (and (vtype = TRUE, U41 & gt; 0, vatable = FALSE), watts * 100 & amp;"% VAT ", IF (and (vtype = TRUE, Matchnew> 1, vatable = When this button is clicked, it says that the %  symbol is an invalid character. 

Please consult what is wrong.

In the form of a test, I call the cell 'wattrate', then in another cell = Vatrate * 100 more Put "% V VAT" and it was evaluated with no problem.

  1. Place your cursor in the cell where this formula is
  2. on the ribbon Click on the 'Formulas'
  3. In the 'Formula Auditing' section of the Ribbon, click on 'Formula Evaluation'

This allows you to have one of your formulas You can give permission to run through the evaluation so that you can see how Excel is looking at its value Evaluating it will tell you why this is going wrong.


No comments:

Post a Comment