ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   display "Missing" when blank (https://www.excelbanter.com/excel-worksheet-functions/182016-display-missing-when-blank.html)

nada

display "Missing" when blank
 
hello,
how could i make any blank cell in a particular range in a worksheet
displays certain word if it is dataless??

Jman

display "Missing" when blank
 
Past this formula in B2

=IF(A2="","missing","")


write something in A2 and then delete it.


"nada" wrote:

hello,
how could i make any blank cell in a particular range in a worksheet
displays certain word if it is dataless??


Per Jessen

display "Missing" when blank
 
Hi

What do you mean by blank?

Does the cell hold a formula or is the user supposed to to enter data into
the cell?

Regards,

Per

"nada" skrev i meddelelsen
...
hello,
how could i make any blank cell in a particular range in a worksheet
displays certain word if it is dataless??



nada

display "Missing" when blank
 
that's not what i need to do, i'll try to be clearer
i have some data in the range b6:m19, some cells in this range are blank, so
i want them automatically display the word "missing" if there is no data in
them, thank you.

"Jman" wrote:

Past this formula in B2

=IF(A2="","missing","")


write something in A2 and then delete it.


"nada" wrote:

hello,
how could i make any blank cell in a particular range in a worksheet
displays certain word if it is dataless??


nada

display "Missing" when blank
 
hello,
i have some data in the range b6:m19, some cells in this range are blank, so
i want them automatically display the word "missing" if there is no data in
them, thank you.



"Per Jessen" wrote:

Hi

What do you mean by blank?

Does the cell hold a formula or is the user supposed to to enter data into
the cell?

Regards,

Per

"nada" skrev i meddelelsen
...
hello,
how could i make any blank cell in a particular range in a worksheet
displays certain word if it is dataless??




Per Jessen

display "Missing" when blank
 
Hello,

Here's a way to do it.

Copy the code below, right click on the sheet tab where you this function.
Click View Code. Paste the code on the code sheet and close the code editor.

Deactivate the sheet, and then activate it again. All "empty" cells will now
say "Missing"
User can enter data as usual and if he delete data in target range the cell
will say "Missing"

I hope this is what you need.

Private Sub Worksheet_Activate()
Dim MyRange As Range
Set MyRange = Range("B6:M19")
For Each c In MyRange
If c.Value = "" Then c.Value = "Missing"
Next
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
Dim MyRange As Range
Set MyRange = Range("B6:M19")
Set isect = Application.Intersect(MyRange, Target)
If Not isect Is Nothing Then
If Target.Value = "" Then Target = "Missing"
End If
End Sub

Best regards,
Per

"nada" skrev i meddelelsen
...
hello,
i have some data in the range b6:m19, some cells in this range are blank,
so
i want them automatically display the word "missing" if there is no data
in
them, thank you.



"Per Jessen" wrote:

Hi

What do you mean by blank?

Does the cell hold a formula or is the user supposed to to enter data
into
the cell?

Regards,

Per

"nada" skrev i meddelelsen
...
hello,
how could i make any blank cell in a particular range in a worksheet
displays certain word if it is dataless??






All times are GMT +1. The time now is 06:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com