Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / November 2007

Tip: Looking for answers? Try searching our database.

Excel if and else statement

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
millwalll - 23 Nov 2007 21:58 GMT
Hi all need some help

Problem
I have a excel page and I want the user to enter his/her name in cell b4. I
want to validate this by saying if there is nothing entered in that field
they get a pop up saying enter your name please. If their name is entered I
want it to carry on running at the moment  it seem to tell them to enter
their name even if they have entered it.

If Sheet2.Range("b4").Value = "" Then
MsgBox ("Please enter your Name")
Else: Sheet2.Range("a2").Value = (Sheet1.Range("b4").Value
end if

any help would be amazing thanks guys/girls ....
Jim Thomlinson - 23 Nov 2007 22:19 GMT
What you have there does not even compile. Does this work for you...

If Sheet2.Range("b4").Value = "" Then
   MsgBox ("Please enter your Name")
Else
   Sheet2.Range("a2").Value = Sheet1.Range("b4").Value
End If

Signature

HTH...

Jim Thomlinson

> Hi all need some help
>
[quoted text clipped - 11 lines]
>
> any help would be amazing thanks guys/girls ....
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.