Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Text Sub
I need help creating a sub that checks "A1" to see if it has text in the
cell, and if so run routine A Else routine B. Any help is always appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Text Sub
Sub Main
if Worksheets("Sheet1").Range("A1").Value < "" then routineA else routineB end if End Sub this runs routineA if A1 is not empty. If you want to check for a specific value replace with if Worksheets("Sheet1").Range("A1").Value = "ABCD" then -- Regards, Tom Ogilvy "Ronbo" wrote in message ... I need help creating a sub that checks "A1" to see if it has text in the cell, and if so run routine A Else routine B. Any help is always appreciated. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Text Sub
Tom, as always... thanks alot for your help.
Regards, Ronbo "Tom Ogilvy" wrote: Sub Main if Worksheets("Sheet1").Range("A1").Value < "" then routineA else routineB end if End Sub this runs routineA if A1 is not empty. If you want to check for a specific value replace with if Worksheets("Sheet1").Range("A1").Value = "ABCD" then -- Regards, Tom Ogilvy "Ronbo" wrote in message ... I need help creating a sub that checks "A1" to see if it has text in the cell, and if so run routine A Else routine B. Any help is always appreciated. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Text Sub
Sub Test1()
If Application.WorksheetFunction.IsText(Range("A1")) Then MsgBox "It's text type" routine A Else routine B End If End Sub "Ronbo" wrote: I need help creating a sub that checks "A1" to see if it has text in the cell, and if so run routine A Else routine B. Any help is always appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using TEXT and &TEXT - display numbers with commas, underline text | Excel Discussion (Misc queries) | |||
Text does not display in "Text boxs" and when wrapping text in a c | Excel Discussion (Misc queries) | |||
Counting a mixed text/number column based on text in another colum | Excel Discussion (Misc queries) | |||
Text not continuing to wrap for large block of text in Excel cell | Charts and Charting in Excel | |||
extracting text from within a cell - 'text to rows@ equivalent of 'text to columns' | Excel Programming |