Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have a situation where I need to insert a line of code into a macro I have,
but I need some help. I need to have the macro present a message to the user if any number is present in a particular cell. So basically this: If cell a7 contains "any number" then message box "this cell contains QTY"... thanks in advance for the assistance. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
try:
If IsNumeric(Range("A7")) And Range("A7") < "" Then MsgBox "This cell contains QTY " & Range("A7") End If "Roger" wrote: I have a situation where I need to insert a line of code into a macro I have, but I need some help. I need to have the macro present a message to the user if any number is present in a particular cell. So basically this: If cell a7 contains "any number" then message box "this cell contains QTY"... thanks in advance for the assistance. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Perfect, almost.... Is there are way to make it so when this does happen,
the macro will stop where the situation occured? "Toppers" wrote: try: If IsNumeric(Range("A7")) And Range("A7") < "" Then MsgBox "This cell contains QTY " & Range("A7") End If "Roger" wrote: I have a situation where I need to insert a line of code into a macro I have, but I need some help. I need to have the macro present a message to the user if any number is present in a particular cell. So basically this: If cell a7 contains "any number" then message box "this cell contains QTY"... thanks in advance for the assistance. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Maybe? have a look in the vba help index for INSTR
-- Don Guillett Microsoft MVP Excel SalesAid Software "Roger" wrote in message ... Perfect, almost.... Is there are way to make it so when this does happen, the macro will stop where the situation occured? "Toppers" wrote: try: If IsNumeric(Range("A7")) And Range("A7") < "" Then MsgBox "This cell contains QTY " & Range("A7") End If "Roger" wrote: I have a situation where I need to insert a line of code into a macro I have, but I need some help. I need to have the macro present a message to the user if any number is present in a particular cell. So basically this: If cell a7 contains "any number" then message box "this cell contains QTY"... thanks in advance for the assistance. |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]() If IsNumeric(Range("A7")) And Range("A7") < "" Then MsgBox "This cell contains QTY " & Range("A7") Exit sub ' (or END) End If "Roger" wrote: Perfect, almost.... Is there are way to make it so when this does happen, the macro will stop where the situation occured? "Toppers" wrote: try: If IsNumeric(Range("A7")) And Range("A7") < "" Then MsgBox "This cell contains QTY " & Range("A7") End If "Roger" wrote: I have a situation where I need to insert a line of code into a macro I have, but I need some help. I need to have the macro present a message to the user if any number is present in a particular cell. So basically this: If cell a7 contains "any number" then message box "this cell contains QTY"... thanks in advance for the assistance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Help needed with a macro | Excel Discussion (Misc queries) | |||
Macro help needed | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |