ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If, And, Isnumber statement (https://www.excelbanter.com/excel-discussion-misc-queries/209997-if-isnumber-statement.html)

dave roth

If, And, Isnumber statement
 
good morning;

I need to write a statement along the lines of :

=IF(AND(ISNUMBER(H2),H2<18),"Yes","No").

H2 contains the formula "=IF(A2<"",DATEDIF(G$2:G$65536,A$2:A$65536,"y")," ")"

Obviously, Columns A and G contain dates, which are populated on an ongoing
basis, not a static set of dates. H2 will not have a number until A2 and G2
are populated.

The If, And, Isnumber formula returns Yes or No, but when I copy it down the
column to say, row 44 while the H column is blank, it returns "No"; what I
would like it to do is remain blank until H2 contains a number value.

XL 2007, Win Xp Pro.

Thank you very much for your assistance.

Mike H

If, And, Isnumber statement
 
Try,

=IF(AND(ISNUMBER(H2),H2<18),"Yes","")

Mike

"dave roth" wrote:

good morning;

I need to write a statement along the lines of :

=IF(AND(ISNUMBER(H2),H2<18),"Yes","No").

H2 contains the formula "=IF(A2<"",DATEDIF(G$2:G$65536,A$2:A$65536,"y")," ")"

Obviously, Columns A and G contain dates, which are populated on an ongoing
basis, not a static set of dates. H2 will not have a number until A2 and G2
are populated.

The If, And, Isnumber formula returns Yes or No, but when I copy it down the
column to say, row 44 while the H column is blank, it returns "No"; what I
would like it to do is remain blank until H2 contains a number value.

XL 2007, Win Xp Pro.

Thank you very much for your assistance.


Mike H

If, And, Isnumber statement
 
Sorry I misunderstood, Try this instead

=IF(H2="","",IF(AND(ISNUMBER(H2),H2<18),"Yes","No" ))

Mike

"dave roth" wrote:

good morning;

I need to write a statement along the lines of :

=IF(AND(ISNUMBER(H2),H2<18),"Yes","No").

H2 contains the formula "=IF(A2<"",DATEDIF(G$2:G$65536,A$2:A$65536,"y")," ")"

Obviously, Columns A and G contain dates, which are populated on an ongoing
basis, not a static set of dates. H2 will not have a number until A2 and G2
are populated.

The If, And, Isnumber formula returns Yes or No, but when I copy it down the
column to say, row 44 while the H column is blank, it returns "No"; what I
would like it to do is remain blank until H2 contains a number value.

XL 2007, Win Xp Pro.

Thank you very much for your assistance.


dave roth

If, And, Isnumber statement
 
Thank you Sir; exactly what I need.

"Mike H" wrote:

Sorry I misunderstood, Try this instead

=IF(H2="","",IF(AND(ISNUMBER(H2),H2<18),"Yes","No" ))

Mike

"dave roth" wrote:

good morning;

I need to write a statement along the lines of :

=IF(AND(ISNUMBER(H2),H2<18),"Yes","No").

H2 contains the formula "=IF(A2<"",DATEDIF(G$2:G$65536,A$2:A$65536,"y")," ")"

Obviously, Columns A and G contain dates, which are populated on an ongoing
basis, not a static set of dates. H2 will not have a number until A2 and G2
are populated.

The If, And, Isnumber formula returns Yes or No, but when I copy it down the
column to say, row 44 while the H column is blank, it returns "No"; what I
would like it to do is remain blank until H2 contains a number value.

XL 2007, Win Xp Pro.

Thank you very much for your assistance.


Bernard Liengme

If, And, Isnumber statement
 
=IF(H2="","", IF(AND(ISNUMBER(H2),H2<18),"Yes","No"))

But if the DATEDIF always gives a number and never an error value, you may
get away with
=IF(H2="","", IF(H2<18,"Yes","No"))


Is there a reason to use
=IF(A2<"",DATEDIF(G$2:G$65536,A$2:A$65536,"y"),"" )
rather than
=IF(A2<"",DATEDIF(G2,A$2,"y"),"")"
Just curious!
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"dave roth" wrote in message
...
good morning;

I need to write a statement along the lines of :

=IF(AND(ISNUMBER(H2),H2<18),"Yes","No").

H2 contains the formula
"=IF(A2<"",DATEDIF(G$2:G$65536,A$2:A$65536,"y")," ")"

Obviously, Columns A and G contain dates, which are populated on an
ongoing
basis, not a static set of dates. H2 will not have a number until A2 and
G2
are populated.

The If, And, Isnumber formula returns Yes or No, but when I copy it down
the
column to say, row 44 while the H column is blank, it returns "No"; what I
would like it to do is remain blank until H2 contains a number value.

XL 2007, Win Xp Pro.

Thank you very much for your assistance.




dave roth

If, And, Isnumber statement
 
No reason; the formula was imported from a previous year's spreadsheet, and
that's how it came in. I believe it was when we upgraded from XL 2003 to
2007.

the DATEDIF has been modified somewhat, because sometimes there is no date
value in A; just an entry of "Pending", so the formula knows to leave column
H blank.

Thanks.

"Bernard Liengme" wrote:

=IF(H2="","", IF(AND(ISNUMBER(H2),H2<18),"Yes","No"))

But if the DATEDIF always gives a number and never an error value, you may
get away with
=IF(H2="","", IF(H2<18,"Yes","No"))


Is there a reason to use
=IF(A2<"",DATEDIF(G$2:G$65536,A$2:A$65536,"y"),"" )
rather than
=IF(A2<"",DATEDIF(G2,A$2,"y"),"")"
Just curious!
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"dave roth" wrote in message
...
good morning;

I need to write a statement along the lines of :

=IF(AND(ISNUMBER(H2),H2<18),"Yes","No").

H2 contains the formula
"=IF(A2<"",DATEDIF(G$2:G$65536,A$2:A$65536,"y")," ")"

Obviously, Columns A and G contain dates, which are populated on an
ongoing
basis, not a static set of dates. H2 will not have a number until A2 and
G2
are populated.

The If, And, Isnumber formula returns Yes or No, but when I copy it down
the
column to say, row 44 while the H column is blank, it returns "No"; what I
would like it to do is remain blank until H2 contains a number value.

XL 2007, Win Xp Pro.

Thank you very much for your assistance.






All times are GMT +1. The time now is 05:23 PM.

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