ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Or statement (https://www.excelbanter.com/excel-programming/292740-statement.html)

Uddinj1

Or statement
 
Hi All,

I am trying to write a statement like

if A or B or C is not date then
Msgbox "Enter Date"

I can do individual ones like
if isdate(A)=false then
msgbox "Enter date"

How do I make one statement to cover all three or more conditions?

Thanks for you help.

Regards

UJ

Frank Kabel

Or statement
 
Hi
try
If Not IsDate(A) or Not IsDate(B) or Not IsDate(C) then
Msgbox "Enter Date"
end if

--
Regards
Frank Kabel
Frankfurt, Germany

Uddinj1 wrote:
Hi All,

I am trying to write a statement like

if A or B or C is not date then
Msgbox "Enter Date"

I can do individual ones like
if isdate(A)=false then
msgbox "Enter date"

How do I make one statement to cover all three or more conditions?

Thanks for you help.

Regards

UJ


Uddinj1

Or statement
 
Frank,

Thank you for your help.

Regards
UJ

onedaywhen

Or statement
 
Or:

if not(IsDate(A) and IsDate(B) and IsDate(C)) then

--

"Frank Kabel" wrote in message ...
Hi
try
If Not IsDate(A) or Not IsDate(B) or Not IsDate(C) then
Msgbox "Enter Date"
end if

--
Regards
Frank Kabel
Frankfurt, Germany

Uddinj1 wrote:
Hi All,

I am trying to write a statement like

if A or B or C is not date then
Msgbox "Enter Date"

I can do individual ones like
if isdate(A)=false then
msgbox "Enter date"

How do I make one statement to cover all three or more conditions?

Thanks for you help.

Regards

UJ



All times are GMT +1. The time now is 04:20 PM.

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