Alert message to fill empty cell.

SASI786

New Member
Joined
Sep 13, 2010
Messages
10
Hi All,
I need a help in excel, as i am not an expert in excel.My question is when we move tab key in excel sheet if any cell is left Blank without filling any data while tab shifts to other cell it should pop up alert message as to fill the blank cell.

What i mean is, if any cell is left empty without any data before the user tries to moves to other cell by pressing Tab it should alert user to fill data.

Can this possible with Validation or does it need macro.
Please suggest any help would be appreciated.
Thanks,
Sasi786:)
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hi All,
I need a help in excel2003, as i am not an expert in excel.My question is when we move tab key in excel sheet if any cell is left Blank without filling any data while tab shifts to other cell it should pop up alert message as to fill the blank cell.

What i mean is, if any cell is left empty without any data before the user tries to moves to other cell by pressing Tab it should alert user to fill data.

Can this possible with Validation or does it need macro.
Can we run code without pressing macro run button.
If this can be done with macro coding then can we popup msg while user leaves empty cell.

Please suggest any help would be appreciated.
Thanks,
Sasi786:)
please provide quick reply to this thread
 
Last edited:
Upvote 0
This requires a Worksheet_SelectionChange macro. What ranges do you want to make sure data is entered into?
 
Upvote 0
Hi MrKowz,

Thanks for immediate reply, but as i'm not very much familiar with vba coding can you help me with the coding.

Actually i have data in excel which starts with column A and ends in column AC, and my requirement is if any cell is not filled up with data and while trying to move to other cell by pressing tab key i need a alert pop up message which indicates user to fill up the empty cell before moving to other cell.

I need a coding which pop up soon after the user tries to skip any cell to fill up in excel2003.I dont need macro which will run after we press macro run button.

Please help me with immediate reply as i'm in quick need of this.

thanks,
sasi786


This requires a Worksheet_SelectionChange macro. What ranges do you want to make sure data is entered into?
 
Upvote 0
So for the entire columns A:AC? Or a specific range of cells in those columns?
 
Upvote 0
Please provide quick reply

I'll get an answer for you once I have an answer to my above question and after I have a chance to program and debug the code.
 
Upvote 0
Right click on the tab you want this code to run on, click "View Code", and copy/paste this into the VBA editor:

Code:
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal target As Range)
    
Application.EnableEvents = False
    
    If Not Intersect(target, Range("A:AC")) Is Nothing Then
        If target.Offset(0, -1).Value = "" Then
            MsgBox "Please enter a value before continuing."
            target.Offset(0, -1).Select
        End If
    End If
    
Application.EnableEvents = True
    
End Sub
 
Upvote 0
Right click on the tab you want this code to run on, click "View Code", and copy/paste this into the VBA editor:

Code:
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal target As Range)
 
Application.EnableEvents = False
 
    If Not Intersect(target, Range("A:AC")) Is Nothing Then
        If target.Offset(0, -1).Value = "" Then
            MsgBox "Please enter a value before continuing."
            target.Offset(0, -1).Select
        End If
    End If
 
Application.EnableEvents = True
 
End Sub

MrKowz,

Thanks a million and you are awesome.
Actually i was trying this many days asked so many friends,colleagues and people who are masters in excel, but i dnt get any reply from them.
thanks thanks a lot...

You Build confidence that you can answer any thing..
So can i ask you one more question regarding excel..
I have data in one column which is filled with date but my problem is when we receive data in excel it actually miss the criteria to be in this format YYYYMMDD.And these dates should be pertaining to only one year(as 2009) and one month(12) data.And could be any date from(1st to 31st).

In the below example first two dates are in right format but the last two missed the format bec 3rd date is 2009 year but 10th month and 4th date is 12 month but 2010 year .
For ex: 20091201
20091203
:oops:20091001
:oops:20101201

So is there any solution which restricts user to enter this incorrect format?Which stops him in entering date other than 2009 year and 12 month?I need a alert pop up message so that user will enter only right data in Date column.

Thanks in advance and waiting for ur reply...
Sasi786
 
Upvote 0

Forum statistics

Threads
1,215,016
Messages
6,122,700
Members
449,092
Latest member
snoom82

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