#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default No blank cell

Hello pals!

Well i am looking for a solution of a problem i am facing currently.

I got a excel table say A1, B1, C1.....................F1 - (cells)

Now after i enter data in cell A1, i use tab to move to next cell that
is B1, but i want data to be compulsorily input in B1 - if i move or
press tab accidentally to move further, that is to C1, i want a pop up
message to appear, "you can't proceed, unless u enter data in B1"

Do anybody can help me out in this, would be greatful if you do.

Still scratching my brains ***@@@###$$$*******

Thanks,
Cheers
Gladson.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default No blank cell

Try this: right-click on tab , "View Code" and copy/paste code below.


Private Sub worksheet_Change(ByVal target As Range)
On Error GoTo ws_Exit
Dim col As Integer
Application.EnableEvents = False
Set ws_range = Range("$A1:$F1")
Set isect = Application.Intersect(target, ws_range)
If Not isect Is Nothing Then
If target.Column 1 Then
For col = 2 To target.Column - 1
If Cells(1, col) = "" Then
MsgBox "You must enter " & Chr(64 + col) & "1 before continuing"
End If
Next col
End If
End If
ws_Exit:
Application.EnableEvents = True

End Sub

HTH

" wrote:

Hello pals!

Well i am looking for a solution of a problem i am facing currently.

I got a excel table say A1, B1, C1.....................F1 - (cells)

Now after i enter data in cell A1, i use tab to move to next cell that
is B1, but i want data to be compulsorily input in B1 - if i move or
press tab accidentally to move further, that is to C1, i want a pop up
message to appear, "you can't proceed, unless u enter data in B1"

Do anybody can help me out in this, would be greatful if you do.

Still scratching my brains ***@@@###$$$*******

Thanks,
Cheers
Gladson.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default No blank cell

Sorry buddy, it didnt solve my problem:

It did give me a pop up alert when i moved forward after C1, but if i
click on ok and continue further, i could go further.

What i wanted is, to restrict the user to move forward at all, unless
he completed entry into cell B1, that is even if its clicked ok after
the pop up alert, it shouldnt allow the user to move forward to the
next cell untill data is filled in B1.........any solutions buddy.

as well, i am not looking for two cells, but one cell only, if
possible one entire coloumn and not two coloumns.

Thanks for the great effort you have been putting in, appreciate that
very much.

Gud Day ahead!
Gladson





On Apr 15, 1:54 pm, Toppers wrote:
Try this: right-click on tab , "View Code" and copy/paste code below.

Private Sub worksheet_Change(ByVal target As Range)
On Error GoTo ws_Exit
Dim col As Integer
Application.EnableEvents = False
Set ws_range = Range("$A1:$F1")
Set isect = Application.Intersect(target, ws_range)
If Not isect Is Nothing Then
If target.Column 1 Then
For col = 2 To target.Column - 1
If Cells(1, col) = "" Then
MsgBox "You must enter " & Chr(64 + col) & "1 before continuing"
End If
Next col
End If
End If
ws_Exit:
Application.EnableEvents = True

End Sub

HTH



" wrote:
Hello pals!


Well i am looking for a solution of a problem i am facing currently.


I got a excel table say A1, B1, C1.....................F1 - (cells)


Now after i enter data in cell A1, i use tab to move to next cell that
is B1, but i want data to be compulsorily input in B1 - if i move or
press tab accidentally to move further, that is to C1, i want a pop up
message to appear, "you can't proceed, unless u enter data in B1"


Do anybody can help me out in this, would be greatful if you do.


Still scratching my brains ***@@@###$$$*******


Thanks,
Cheers
Gladson.- Hide quoted text -


- Show quoted text -



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default No blank cell

If you want to make sure that the user enters data in A1:F1 before they select
any other cell, you could use something like:

Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myRng As Range
Dim myCell As Range

Set myRng = Me.Range("a1:F1")

On Error GoTo ErrHandler:
For Each myCell In myRng.Cells
If IsEmpty(myCell.Value) Then
Application.EnableEvents = False
myCell.Select
MsgBox "Please enter a value in: " & myCell.Address(0, 0)
Exit For
End If
Next myCell

ErrHandler:
Application.EnableEvents = True

End Sub


Personally, this would drive me nuts.

I'd put a formula in a cell (Say G1) that looked like:
=if(counta(a1:f1)=6,"","Please enter all the values")
In big red letters.



" wrote:

Hello pals!

Well i am looking for a solution of a problem i am facing currently.

I got a excel table say A1, B1, C1.....................F1 - (cells)

Now after i enter data in cell A1, i use tab to move to next cell that
is B1, but i want data to be compulsorily input in B1 - if i move or
press tab accidentally to move further, that is to C1, i want a pop up
message to appear, "you can't proceed, unless u enter data in B1"

Do anybody can help me out in this, would be greatful if you do.

Still scratching my brains ***@@@###$$$*******

Thanks,
Cheers
Gladson.


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
add blank space in cell if first name is not blank stef Excel Worksheet Functions 6 August 23rd 06 02:26 AM
=IF cell needs to show blank if blank Boethius1 Excel Discussion (Misc queries) 5 March 1st 06 05:36 PM
how to get excel to display blank if reference cell blank silent1(not) Excel Worksheet Functions 1 December 2nd 05 02:49 PM
How do I make a blank cell with a date format blank? Pivot Table/Query Excel Worksheet Functions 6 June 14th 05 11:19 PM
COPY A CONCATENATE CELL TO BLANK CELL PUTTING IN THE NEXT BLANK C. QUEST41067 Excel Discussion (Misc queries) 1 January 15th 05 09:29 PM


All times are GMT +1. The time now is 10:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"