Reputation: 51
I want the below code to write the result of an InputBox
on the cell L14 if the cell C4 has the text "TRUE".
Sub dele()
myValue4 = InputBox("What's the number?")
If Range("C4").Value = "TRUE" Then
Range("L14").Value = myValue4
End If
Doesn't seem to work. Any ideas?
Upvotes: 1
Views: 27
Reputation: 19077
Text conditions are case sensitive. Therefore try with this:
If Ucase(Range("C4").Value) = "TRUE" Then
However, if you have just a boolean value in Range("C4") this should also work:
If Range("C4").Value = True Then
Upvotes: 1