Identifying a cell with text using code?

Todd_M

Board Regular
Joined
Feb 24, 2002
Messages
117
Hi-
If ActiveCell.Offset(0, :cool:.Value = Text Then
MsgBox "It works"
End If

Im trying to see if a cell located 8 cells to the left of a list has any text in it, and if it does to display a msgbox. My code does not work, any ideas??
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
On 2002-03-25 09:25, Todd_M wrote:
Hi-
If ActiveCell.Offset(0, 8).Value = Text Then
MsgBox "It works"
End If

Im trying to see if a cell located 8 cells to the left of a list has any text in it, and if it does to display a msgbox. My code does not work, any ideas??

Try this:<pre>
If Application.WorksheetFunction.IsText _
(ActiveCell.Offset(0, 8).Value) = True Then
MsgBox "It works"
End If</pre>

Regards,

_________________

Barrie Davidson
My Excel Web Page
This message was edited by Barrie Davidson on 2002-03-25 09:45
 
Upvote 0
Barrie- One follow up, Using this idea of a code:


If Application.WorksheetFunction.IsText _
(ActiveCell.Offset(0, :cool:.Value) = True Then
TextBox1.Text in Range("an:an")).Delete
End If

Im trying to delete a name in row "AN" with the name in textbox1. Inother words when activecell.offset(0, :cool: lists a value, then I want the name located in row "AN" (listed in textbox1) to delete!
Thanks
 
Upvote 0

Forum statistics

Threads
1,214,386
Messages
6,119,216
Members
448,876
Latest member
Solitario

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