VBA 04 IF Statements

Pinaceous

Well-known Member
Joined
Jun 11, 2014
Messages
1,124
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I've submitted a thread

VBA 03 IF Criteria Conditions

where I'm asking a similar question, but I feel as though I hit a wall based on a new condition, which I believe warrants this new string based on an additional criteria (3+1=4th criteria) being a 4th criteria.




Please forgive me, if I cannot see the obvious here as I'm really confused.


Code:
If IsEmpty(Sheet1.Range("A1").Value) Then
MsgBox "First!"
Where; If there is a NUMBER at Sheet1.A1 then go to next code:

Code:
Where; If IsEmpty(Sheet10.Range("A1").Value) Then
MsgBox "Second!"
If there is a NUMBER at Sheet1.A1 & Sheet10.A1 then go to next code:
Code:
Where; If IsEmpty(Sheet5.Range("A1").Value) Then
MsgBox "Third!"
Where; If there is a NUMBER at Sheet1.A1 & Sheet10.A1 & Sheet5.A1 then

[/CODE]

Where; If there is a NUMBER at Sheet1.A1 & Sheet10.A1 then

Code:
MsgBox "Good to Go!"




Can someone please help me piece together this into a single macro??

Thanks!

Pinaceous
 
Last edited:

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Did not read your other thread, and not sure I understand what you want here, but maybe this will help:
Code:
Select Case True
       Case Not IsEmpty(Sheet1.Range("A1")): MsgBox "First!"
       Case Not IsEmpty(Sheet10.Range("A1")): MsgBox "Second!"
       Case Not IsEmpty(Sheet5.Range("A1")): MsgBox "Third!"
       Case Else: MsgBox "Good to go"
End Select
 
Upvote 0
Hi Joe,

Thanks for posting, you code seems like the one I need!

I'm going to test it out later.

Thanks again,
Pinaceous
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,213
Members
453,024
Latest member
Wingit77

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top