If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How can I check 2 cells?
How can i check Cells D1 and C2 to see if there is a anything written in
them? (notes) I would like to check D1 first, and if it is empty check c2, and if both are empty I will pop up a message box, but if either one of them have something in them then, I dont want to pop up the message box..... I hope all of that makes sense thanks --- Message posted from http://www.ExcelForum.com/ |
#2
|
|||
|
|||
How can I check 2 cells?
Hi
do you need a messagebox (so a VBA solution). If yes you may try: sub check_it() dim ret_value with activesheet application.counta(.range("D1"),.range("C2")) end with if ret_value=0 then msgbox "no value in either cell" end if end sub -- Regards Frank Kabel Frankfurt, Germany How can i check Cells D1 and C2 to see if there is a anything written in them? (notes) I would like to check D1 first, and if it is empty check c2, and if both are empty I will pop up a message box, but if either one of them have something in them then, I dont want to pop up the message box..... I hope all of that makes sense thanks --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | |
Display Modes | |
|
|