Hi there,
Hope all is well, I'm somewhere competent with normal excel and can use forumlae to get the result but I have pretty much zero vba knowledge. the strictly basic skills that I own have been learnt by modifying other peoples codes from this and other forums - thanks for the help over the times.
I have 2 Macro's, and i need to pick the right macro depending on wether four cell on the active sheet are blank.
C13 and C52 will have text, where as B37 and B76 will have a date. If all four cells are not blank, then I need Macro 2 to run. However if C52 and B76 are blank, but C13 and B37 are not, then I need Macro1 to run.
As an ideal, I'd also like a message box saying "no need to format sheet", if C13 is not blank but the others are (C13 will never ever be blank!)
I'm failing big time and would appreciate the help on the below code (although it is no doubt miles off).
Thanks in advance.
Sub AddSheetFormatChange()
If Range("C13") And Range("B37") And Range("C52") And Range("B76") <> "" Then
Application.Run "SecondAddNewSheets"
ElseIf Range("C13") And Range("B37") <> "" Then
Application.Run "FirstAddNewSheets"
Else: MsgBox "God Knows what has happened - Ask Simon "
End If
End Sub
Hope all is well, I'm somewhere competent with normal excel and can use forumlae to get the result but I have pretty much zero vba knowledge. the strictly basic skills that I own have been learnt by modifying other peoples codes from this and other forums - thanks for the help over the times.
I have 2 Macro's, and i need to pick the right macro depending on wether four cell on the active sheet are blank.
C13 and C52 will have text, where as B37 and B76 will have a date. If all four cells are not blank, then I need Macro 2 to run. However if C52 and B76 are blank, but C13 and B37 are not, then I need Macro1 to run.
As an ideal, I'd also like a message box saying "no need to format sheet", if C13 is not blank but the others are (C13 will never ever be blank!)
I'm failing big time and would appreciate the help on the below code (although it is no doubt miles off).
Thanks in advance.
Sub AddSheetFormatChange()
If Range("C13") And Range("B37") And Range("C52") And Range("B76") <> "" Then
Application.Run "SecondAddNewSheets"
ElseIf Range("C13") And Range("B37") <> "" Then
Application.Run "FirstAddNewSheets"
Else: MsgBox "God Knows what has happened - Ask Simon "
End If
End Sub