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

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
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,223,954
Messages
6,175,603
Members
452,660
Latest member
Zatman

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