Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Good Morning! I have this code that checks 2 cells for data. If data is in cell A1, but not B1 a message box pops up, "Cell B1 has no code". This part of the code works fine. If both cells has the information needed, how do I return a message box that says, "Check Sheet Sucessful". I'm using a macro button on the sheet to check these conditions: Code: Sub Check_click() If Range("A1").Value < "" And Range("B1").Value = "" Then MsgBox "Please enter a code in the 1st box, under code in Special Purpose Deposits. Click Ok and type General or Building!", 16, "message" Range("B1").Select End If If Range("A1").Value = "" And Range("B1").Value = "" Then MsgBox "Successful!", 16, "message" End If End Sub By the way, I don't get any errors. If B1 if left empty, I get the first message box, and it goes to the cell. If I leave cell B1 blank, then run the macro, nothing happens, the screen just blinks, like something did. Thanks, EMoe -- EMoe ------------------------------------------------------------------------ EMoe's Profile: http://www.excelforum.com/member.php...o&userid=23183 View this thread: http://www.excelforum.com/showthread...hreadid=374525 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Countif Conditions - Use of conditions that vary by cell value | Excel Discussion (Misc queries) | |||
Spell Checking with checking cell notes | Excel Discussion (Misc queries) | |||
Checking cells for 2 conditions | Excel Worksheet Functions | |||
checking two conditions | Excel Discussion (Misc queries) | |||
Checking if 2 of 3 conditions are met... | Excel Discussion (Misc queries) |