title: Excel VBA: convert formula value to text
body: <p>I would like to have an answer to a following situation. I have basic VBA knowledge, sorry if I'm using incorrect expressions.</p>
  
  <p>Let's say I would like to go on a long trip, but have to check the tires' conditions before departing. I have to have answers on 3 questions:</p>
  
  <ol>
  <li>Are the tires under/overinflated? (answer to G1) </li>
  <li>Is any of the tires flat? (G2) </li>
  <li>Do I have to change the tires due to different weather conditions?
  (G3)</li>
  </ol>
  
  <p>Thing is if any of the questions remain unanswered or the answer is Yes, further actions are required (in subsequent rows of the excel sheet, rows 5-9). In case all the 3 answers are No, tires are OK and I want the subsequent rows hidden.</p>
  
  <p>To wrap up the conclusion, I have entered the following formula to G4:</p>
  
  <p><code>=IF(AND(G1="No",G2="No",G3="No"), "No", "Yes")</code>.</p>
  
  <p>The formula answers perfectly.
  I pasted some excerpts of the code I have so far:</p>
  
  <pre><code>Worksheet_Change(ByVal Target As Range)
   Select Case Target.Address
    Case "$G$4"
    Rows("5:9").EntireRow.Hidden = (Target = "No")
  ...
  </code></pre>
  
  <p>The issue is that the code is not reading the answer of the formula in cell G4. If I delete the formula and rewrite the answer manually, the code is working perfectly and hides the subsequent rows.
  <strong>So the main issue is to convert the result of the formula in G4 to make it readable for the code.</strong></p>
  
  <p>Can anybody help please? Or is there a better solution? Thanks in advance.</p>