Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-10-2015, 06:11 PM
ubns ubns is offline If id cell range is empty then should not allow to fill any other cell Windows 7 32bit If id cell range is empty then should not allow to fill any other cell Office 2010 32bit
Competent Performer
If id cell range is empty then should not allow to fill any other cell
 
Join Date: Apr 2012
Posts: 177
ubns is on a distinguished road
Default If id cell range is empty then should not allow to fill any other cell

Hi,

I have ID cell Range from a5:a1000, and I want if the user starts filling in any other adjacent cells in that row where id cell range is empty then it should not allow them and message box should pop up that fill in the id cell with cell number.

Is it possible?
Reply With Quote
  #2  
Old 04-12-2015, 02:44 AM
gmayor's Avatar
gmayor gmayor is offline If id cell range is empty then should not allow to fill any other cell Windows 7 64bit If id cell range is empty then should not allow to fill any other cell Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

How about restricting the area available with sheet protection e.g. http://www.dummies.com/how-to/conten...-certain-.html ?

You don't need to use a password.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 04-12-2015, 06:31 AM
Snakehips Snakehips is offline If id cell range is empty then should not allow to fill any other cell Windows 8 If id cell range is empty then should not allow to fill any other cell Office 2013
Advanced Beginner
 
Join Date: Mar 2015
Posts: 36
Snakehips is on a distinguished road
Default

ubns,

I'm thinking that something like the below is what you are wanting.
Right click your sheet tab >> View Code >> paste the following into the code pane.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Cells.Count > 1 Then Exit Sub
If Target.Row < 5 Or Target.Row > 1000 Then Exit Sub
If Target.EntireRow.Cells(1, 1) <> "" Then Exit Sub

nr = Cells(Rows.Count, 1).End(xlUp).Row + 1
MsgBox "Please enter an ID in the next available row before attempting to add other data"
Cells(nr, 1).Select
Application.EnableEvents = False
Target.ClearContents
Application.EnableEvents = True

End Sub
Hope that helps.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
If id cell range is empty then should not allow to fill any other cell Assign the value of a cell as a cell reference of another cell in Excel 2010 - How to? bharathkumarst Excel 7 10-13-2014 10:25 AM
If id cell range is empty then should not allow to fill any other cell Delete empty cell and shift up Linh Word Tables 1 09-21-2014 01:52 PM
Change formula cell range based on cell value Scoth Excel 4 10-25-2012 07:51 AM
If id cell range is empty then should not allow to fill any other cell Limit cell range use talkinglens Excel 6 12-31-2010 08:43 PM
How can I fill cell color starting from Cell D5 using Conditional formatting instead Learner7 Excel 0 07-08-2010 05:50 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft