Hello all,
I have a small problem and I just can't make it work:
- in cell a1 I have a drop-down list with "yes" / "no"
- I need a solution that, if the cell a1 is yes, to make me write one number in cell b2 - it should not let me continue without inserting the number in b2
- I was thinking about vba, tried something like this, but I don't know how to make the link between vba and cell a1/b2
<code spellcheck="false" class="listtype-code listindent1 list-code1 lang-php">
Sub test()</code>
<code spellcheck="false" class="listtype-code listindent1 list-code1 lang-php">
</code>
<code spellcheck="false" class="listtype-code listindent1 list-code1 lang-php">Dim myValue As Variant</code>
<code spellcheck="false" class="listtype-code listindent1 list-code1 lang-php">If ActiveSheet.Range("A1").Value = "YES" Then</code>
<code spellcheck="false" class="listtype-code listindent1 list-code1 lang-php">myValue = InputBox("please insert the number")</code>
<code spellcheck="false" class="listtype-code listindent1 list-code1 lang-php">Range("b2").Value = myValue</code>
<code spellcheck="false" class="listtype-code listindent1 list-code1 lang-php">End If</code>
<code spellcheck="false" class="listtype-code listindent1 list-code1 lang-php">End Sub
I am opened to any other/simpler solution.
Any help would be greatly appreciated.
Thank you </code>
I have a small problem and I just can't make it work:
- in cell a1 I have a drop-down list with "yes" / "no"
- I need a solution that, if the cell a1 is yes, to make me write one number in cell b2 - it should not let me continue without inserting the number in b2
- I was thinking about vba, tried something like this, but I don't know how to make the link between vba and cell a1/b2
<code spellcheck="false" class="listtype-code listindent1 list-code1 lang-php">
Sub test()</code>
<code spellcheck="false" class="listtype-code listindent1 list-code1 lang-php">
</code>
<code spellcheck="false" class="listtype-code listindent1 list-code1 lang-php">Dim myValue As Variant</code>
<code spellcheck="false" class="listtype-code listindent1 list-code1 lang-php">If ActiveSheet.Range("A1").Value = "YES" Then</code>
<code spellcheck="false" class="listtype-code listindent1 list-code1 lang-php">myValue = InputBox("please insert the number")</code>
<code spellcheck="false" class="listtype-code listindent1 list-code1 lang-php">Range("b2").Value = myValue</code>
<code spellcheck="false" class="listtype-code listindent1 list-code1 lang-php">End If</code>
<code spellcheck="false" class="listtype-code listindent1 list-code1 lang-php">End Sub
I am opened to any other/simpler solution.
Any help would be greatly appreciated.
Thank you </code>