Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Supressing a #VALUE! error returned?

I have a worksheet that contains two dates and open and closed, a target turnaround in days and am calculating days to target date and also instances that have missed target but are still open.

Example below (rows and columns included)

A B C D

1 TARGET
2 5
3 IN OUT DAYS TO TARGET OPEN FAILURES
4 28/01/2015 -3 1
5 28/01/2015 03/02/2015 #VALUE! #VALUE!
6 28/01/2015 03/02/2015 #VALUE! #VALUE!
7 30/01/2015 -1 1
8 02/02/2015 0 FALSE
9 03/02/2015 1 FALSE


Cells

A1 Target label

A2 Target in days (5)

Row 3 Labels

A4 booked in date

B4 booked out date

C4 Formula to calculate days to target, I am interested only in working
days (Mon to Fri) and removing Bank Holidays hence am referencing a range of Bank Holiday dates, B_H.
=IF(B4<"","CLOSED",(NETWORKDAYS(A4,TODAY(),B_H)-1)-$A$2)*-1

D4 Returns a 1 is something has missed target and is still open, so I can add these occurences up.
=IF(C4<0,IF(B4="","1",""))

I appreciate why the #VALUE! errors are there and they don't stop this working but are unslightly.
How do I get the formula to in column C to return CLOSED and in both columns supress the #VALUE! errors?

Any help is most welcome.

Thanks for reading.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Supressing a #VALUE! error returned?

Hi Phil,

Am Mon, 9 Feb 2015 03:53:59 -0800 (PST) schrieb Phil:

=IF(B4<"","CLOSED",(NETWORKDAYS(A4,TODAY(),B_H)-1)-$A$2)*-1


try:
=IF(ISNUMBER(B4),"CLOSED",-(NETWORKDAYS(A4,TODAY(),B_H)-$A$2-1))

D4 Returns a 1 is something has missed target and is still open, so I can add these occurences up.
=IF(C4<0,IF(B4="","1",""))


try:
=IF(AND(C4<0,LEN(B4)=0),1,"")

Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Supressing a #VALUE! error returned?

On Monday, February 9, 2015 at 11:54:07 AM UTC, Phil wrote:
I have a worksheet that contains two dates and open and closed, a target turnaround in days and am calculating days to target date and also instances that have missed target but are still open.

Example below (rows and columns included)

A B C D

1 TARGET
2 5
3 IN OUT DAYS TO TARGET OPEN FAILURES
4 28/01/2015 -3 1
5 28/01/2015 03/02/2015 #VALUE! #VALUE!
6 28/01/2015 03/02/2015 #VALUE! #VALUE!
7 30/01/2015 -1 1
8 02/02/2015 0 FALSE
9 03/02/2015 1 FALSE


Cells

A1 Target label

A2 Target in days (5)

Row 3 Labels

A4 booked in date

B4 booked out date

C4 Formula to calculate days to target, I am interested only in working
days (Mon to Fri) and removing Bank Holidays hence am referencing a range of Bank Holiday dates, B_H.
=IF(B4<"","CLOSED",(NETWORKDAYS(A4,TODAY(),B_H)-1)-$A$2)*-1

D4 Returns a 1 is something has missed target and is still open, so I can add these occurences up.
=IF(C4<0,IF(B4="","1",""))

I appreciate why the #VALUE! errors are there and they don't stop this working but are unslightly.
How do I get the formula to in column C to return CLOSED and in both columns supress the #VALUE! errors?

Any help is most welcome.

Thanks for reading.


Claus, your solution has worked perfectly.
Thanks for reading and replying so promptly.
Cheers,
Phil.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Supressing a #VALUE! error returned?

Hi Phil,

Am Mon, 9 Feb 2015 08:21:35 -0800 (PST) schrieb Phil:

Thanks for reading and replying so promptly.


you are welcome. I am always glad to help.


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
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
Sub to check and report any formula returned error (eg: #REF!) Max Excel Programming 5 February 7th 10 03:12 AM
different values shown when #DIV/0! error is returned as result Danko Jotanovic Excel Discussion (Misc queries) 3 September 4th 09 09:18 AM
VALUE ERROR RETURNED FROM FORMULA mcoge Excel Worksheet Functions 4 March 7th 09 02:26 AM
error handling-need to get rid of a value returned as #N/A Gluefoot Excel Worksheet Functions 2 February 5th 08 10:40 PM
Error being returned Pat Excel Worksheet Functions 4 January 17th 05 04:33 PM


All times are GMT +1. The time now is 05:36 AM.

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"