Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Excel 2003 Suppressing Errors

Hello,

The following function works fine, however, if there are no dates
populated into my spreadsheet, the resultant cells in column H show the:
#VALUE! error.

=+IF(AND($B$1-G3<-24,$B$1-G3-31),"D",IF($B$1-G3<0,"C",IF($B$1-G3=0,"E"
," ")))

Could someone please advise on how I can suppress this error using an
Excel function such as ISERROR or ISBLANK?

Any help would be greatly appreciated.

Kind regards,

Chris.

*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default Excel 2003 Suppressing Errors

Try:

=IF(ISERROR(your formula),"",your formula)

You could check if either of the dates is blank

=IF(OR(date1="",date2=""),"",your formula)

Regards

Trevor


"Chris Hankin" wrote in message
...
Hello,

The following function works fine, however, if there are no dates
populated into my spreadsheet, the resultant cells in column H show the:
#VALUE! error.

=+IF(AND($B$1-G3<-24,$B$1-G3-31),"D",IF($B$1-G3<0,"C",IF($B$1-G3=0,"E"
," ")))

Could someone please advise on how I can suppress this error using an
Excel function such as ISERROR or ISBLANK?

Any help would be greatly appreciated.

Kind regards,

Chris.

*** Sent via Developersdex http://www.developersdex.com ***



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Excel 2003 Suppressing Errors

Thanks Trevor for your help.

Please note that my original formula is:

=+IF(AND($B$1-G3<-24,$B$1-G3-31),"D",IF($B$1-G3<0,"C",IF($B$1-G3=0,"E"
," ")))

Your suggested solution is:

=IF(ISERROR(your formula),"",your formula)


So, I ended up with the following formula which for some unkown reason
Excel 2003 does not like:

=IF(ISERROR(=+IF(AND($B$1-G3<-24,$B$1-G3-31),"D",IF($B$1-G3<0,"C",IF($B
$1-G3=0,"E","
")))),"",=+IF(AND($B$1-G3<-24,$B$1-G3-31),"D",IF($B$1-G3<0,"C",IF($B$1-
G3=0,"E"," "))))

Could you please advise if I have entered in the formula correctly?

Your assistance is most appreciated.

Thanks,

Chris.


*** Sent via Developersdex http://www.developersdex.com ***
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default Excel 2003 Suppressing Errors

The equals sign (=) designating a formula should only appear as the first
character. And you don't need the plus sign (+).

So:

=IF(ISERROR(IF(AND($B$1-G3<-24,$B$1-G3-31),"D",IF($B$1-G3<0,"C",IF($B
$1-G3=0,"E","
")))),"",IF(AND($B$1-G3<-24,$B$1-G3-31),"D",IF($B$1-G3<0,"C",IF($B$1-
G3=0,"E"," "))))

I think it would be more efficient to check for blank dates but if it works
....

Regards

Trevor


"Chris Hankin" wrote in message
...
Thanks Trevor for your help.

Please note that my original formula is:

=+IF(AND($B$1-G3<-24,$B$1-G3-31),"D",IF($B$1-G3<0,"C",IF($B$1-G3=0,"E"
," ")))

Your suggested solution is:

=IF(ISERROR(your formula),"",your formula)


So, I ended up with the following formula which for some unkown reason
Excel 2003 does not like:

=IF(ISERROR(=+IF(AND($B$1-G3<-24,$B$1-G3-31),"D",IF($B$1-G3<0,"C",IF($B
$1-G3=0,"E","
")))),"",=+IF(AND($B$1-G3<-24,$B$1-G3-31),"D",IF($B$1-G3<0,"C",IF($B$1-
G3=0,"E"," "))))

Could you please advise if I have entered in the formula correctly?

Your assistance is most appreciated.

Thanks,

Chris.


*** Sent via Developersdex http://www.developersdex.com ***



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Excel 2003 Suppressing Errors

Thanks again Trevor - this works very well now - excellent work - very
much appreciated.

Cheers,

Chris.



*** Sent via Developersdex http://www.developersdex.com ***
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 + hungapp errors rick m Excel Discussion (Misc queries) 0 March 25th 08 09:27 AM
errors in Excel 2003 Kilbrennan Excel Programming 6 April 7th 06 01:57 PM
errors in Excel 2003 Kilbrennan Excel Discussion (Misc queries) 0 April 6th 06 11:32 AM
excel 2003: Module errors Kikulitz Excel Programming 1 May 11th 05 01:42 PM
Excel 2003 Updates, and Errors SchachMeister Setting up and Configuration of Excel 0 April 25th 05 05:33 PM


All times are GMT +1. The time now is 10:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"