Msgbox if cell contains text

Dobbo

New Member
Joined
Apr 2, 2002
Messages
12
If cell F3 contains text I want a message box run, I can do this with a number but having problems if cell contains text.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Not quite what I meant, cell F3 could contain any text not "text" the word. Basically if cell F3 contains any word I want a message box to run.
 
Upvote 0
Here you go:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)

If Worksheets("sheet1").Range("f3").Value = "" Then
Exit Sub
Else
MsgBox ("An entry has been made")
End If

End Sub

Audiojoe
This message was edited by Audiojoe on 2002-04-24 02:42
 
Upvote 0
Many Thanks sorted out the problem now. I had the extra problem that F3 cell was merged with G3 & H3 so I had to call the range as well.

Works perfectly now Thank you
 
Upvote 0

Forum statistics

Threads
1,214,598
Messages
6,120,441
Members
448,966
Latest member
DannyC96

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