Pinaceous
Well-known Member
- Joined
- Jun 11, 2014
- Messages
- 1,124
- Office Version
- 365
- Platform
- Windows
Hi All,
I have 03 'IF' Criteria Conditions be satisfied that represent 03 Macros posted here:
Criteria 1 = Sheet1 (A1) & Sheet 10 (A1); are both BLANK and produce:
MsgBox ("First Enter DATE!!")
Criteria 2 = Sheet1 (A1) & Sheet 10 (A1); where Sheet1 has a # in A1 AND Sheet10 A1 is BLANK and produces: MsgBox ("Continue Sub!!")
Criteria 3 = Sheet1 (A1) & Sheet 10 (A1); where Sheet1 has a # in A1 AND Sheet10 A1 has a # and produces: MsgBox ("This was already Executed!!")
My conundrum is, how do I combine these 03 Macros into a single Macro??
I've tried several methods and I'm not getting it.
Please post a code to help, if you can.
Thank you!
-Pin
I have 03 'IF' Criteria Conditions be satisfied that represent 03 Macros posted here:
Criteria 1 = Sheet1 (A1) & Sheet 10 (A1); are both BLANK and produce:
MsgBox ("First Enter DATE!!")
Code:
Sub Macro36()
'
' Macro36 Macro
'
'
If IsEmpty(Sheet1.Range("A1").Value) Then
If IsEmpty(Sheet10.Range("A1").Value) Then
MsgBox ("First Enter DATE!!")
End If
End If
Exit Sub
End Sub
Criteria 2 = Sheet1 (A1) & Sheet 10 (A1); where Sheet1 has a # in A1 AND Sheet10 A1 is BLANK and produces: MsgBox ("Continue Sub!!")
Code:
Sub Macro37()
'
' Macro36 Macro
'
'
If Not IsEmpty(Sheet1.Range("A1").Value) Then
If IsEmpty(Sheet10.Range("A1").Value) Then
MsgBox ("Continue Sub!!")
End If
End If
Exit Sub
End Sub
Criteria 3 = Sheet1 (A1) & Sheet 10 (A1); where Sheet1 has a # in A1 AND Sheet10 A1 has a # and produces: MsgBox ("This was already Executed!!")
Code:
Sub Macro38()
'
' Macro36 Macro
'
'
If Not IsEmpty(Sheet1.Range("A1").Value) Then
If Not IsEmpty(Sheet10.Range("A1").Value) Then
MsgBox ("This was already Executed!!")
End If
End If
Exit Sub
End Sub
My conundrum is, how do I combine these 03 Macros into a single Macro??
I've tried several methods and I'm not getting it.
Please post a code to help, if you can.
Thank you!
-Pin
Last edited: