Pinaceous
Well-known Member
- Joined
- Jun 11, 2014
- Messages
- 1,113
- Office Version
- 365
- Platform
- Windows
Hi All,
I'm trying to reference a cell in vba of
that has the formula
present there.
In using the Select Case &/or If statements, I cannot seem to create the correct criteria whereby the referenced cell of
is truly blank.
If I use:
Or
This is confusing me.
Can you please lend me your thoughts?
Many thanks,
pinaceous
I'm trying to reference a cell in vba of
Code:
Sheet1.B5
Code:
=IF(Sheet2!B6=0,"",Sheet2!B6)
In using the Select Case &/or If statements, I cannot seem to create the correct criteria whereby the referenced cell of
Code:
Sheet1.B5
If I use:
Code:
Sub TestBlank()
If Not Sheet1.Range("B5").Value= "" Then
'If Cell is Occupied Then
'or Text
MsgBox "Occupied"
End If
If Sheet1.Range("B5").Value = "" Then
'If Cell is Blank Then
'or Text
MsgBox "Blank"
'
End If
End Sub
Or
Code:
Select Case True
Case Not Sheet1.Range("B5").Value = ""
'If Cell is Occupied Then
'or Text
MsgBox "Occupied"
Case Sheet1.Range("B5").Value = ""
'If Cell is Blank Then
'or Text
MsgBox "Blank"
'
End Select
This is confusing me.
Can you please lend me your thoughts?
Many thanks,
pinaceous