ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Error Message Box (https://www.excelbanter.com/excel-discussion-misc-queries/127733-error-message-box.html)

Daviv

Error Message Box
 
I want to write a if function that would tell the user using a message box
that an incorrect type has been entered. For example, the correct type is a
number not a letter or anything else. I want the function to post error
message if it is the wrong type and leave the input in the cell if everything
is OK.
--
Thanks!

Bob Umlas, Excel MVP

Error Message Box
 
Instead of resorting to a function, why not use Data Validation on the cell?
Data/Validation/Allow Custom, enter this formula (substitute the active cell
for A1 in the following)
=NOT(ISERROR(1*A1)) then click the Error Alert tab and enter the appropriate
message.
Bob Umlas
Excel MVP

"Daviv" wrote:

I want to write a if function that would tell the user using a message box
that an incorrect type has been entered. For example, the correct type is a
number not a letter or anything else. I want the function to post error
message if it is the wrong type and leave the input in the cell if everything
is OK.
--
Thanks!



All times are GMT +1. The time now is 04:45 AM.

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