Prevent entry in cell i cell is not blank

MadBern

New Member
Joined
May 10, 2019
Messages
37
Hey

Is it possible to use Data Validation to prevent someone from overwriting text in cell if there is already text in it?
So that the cell has to be cleared before you can type in something new?

I've tried =NOT(ISBLANK(A1)) and a few other formulas, but none worked.

Regards
Mads
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
G'day MB,

I am in no way an expert, but my feeling is that this can only be done with VBA.

Without VBA cells can (aside from being blank) contain either manually entered data or a formula, meaning that there is no means to have a formula in a cell dictate what data is entered into the same cell.

The closest you can come is to use conditional formatting to visually indicate that this cell should not have data entered.

Cheers

shane
 
Upvote 0
G'day MB,

I am in no way an expert, but my feeling is that this can only be done with VBA.

Without VBA cells can (aside from being blank) contain either manually entered data or a formula, meaning that there is no means to have a formula in a cell dictate what data is entered into the same cell.

The closest you can come is to use conditional formatting to visually indicate that this cell should not have data entered.

Cheers

shane
Well, you can dictate that, at least to some extent. In cell AB9 I have the following Data Validation formula: =COUNTIF($S:$S,AB9)
This states that if you try and type something in cell AB9 that isn't found in range S:S, you'll get an error.

However, you might be right, that dictating that the cell must be clear before something new can be typed in is something that only can be achieved though VBA. Which doesn't help me since this workbook is used only in Excel Online, and macros aren't supported there.


Regards,
Mads
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,120
Members
451,399
Latest member
alchavar

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