Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 155
Default Where no value, display "NA" - if statement?

Good morning all,

Issue: I use the following formula to display data:

=SUMPRODUCT(--('Daily Reading Master
Log'!B$3:B$211=DATEVALUE("02/01")),--('Daily Reading Master
Log'!B$3:B$211<=DATEVALUE("2/28")),'Daily Reading Master
Log'!BW$3:BW$211)/SUMPRODUCT(--('Daily Reading Master
Log'!B$3:B$211=DATEVALUE("02/01")),--('Daily Reading Master
Log'!B$3:B$211<=DATEVALUE("2/28")))

Problem:
Where this calculation is performed on a set of data that has no values, I
get the 'DIV/0' error. I understand why this occurs, however:

Question:
How can i add an 'IF' component to this equation, such that if the result of
hte calculation is 'DIV/0, display 'N/A', rather than the DIV/0 error

Many thanks in advance,


--
Carlee
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Where no value, display "NA" - if statement?

You get #DIV/0 when the denominator is zero, so this is what you need
to check for. Try this:

=IF(SUMPRODUCT(--('Daily Reading Master Log'!B$3:B
$211=DATEVALUE("02/01")),--('Daily Reading Master Log'!B$3:B
$211<=DATEVALUE("2/28")))=0,"NA",SUMPRODUCT(--('Daily Reading Master
Log'!B$3:B$211=DATEVALUE("02/01")),--('Daily Reading Master Log'!B$3:B
$211<=DATEVALUE("2/28")),'Daily Reading Master Log'!BW$3:BW$211)/
SUMPRODUCT(--('Daily Reading Master Log'!B$3:B
$211=DATEVALUE("02/01")),--('Daily Reading Master Log'!B$3:B
$211<=DATEVALUE("2/28"))))

Hope this helps.

Pete

On Jan 28, 6:15*pm, Carlee wrote:
Good morning all,

Issue: *I use the following formula to display data:

=SUMPRODUCT(--('Daily Reading Master
Log'!B$3:B$211=DATEVALUE("02/01")),--('Daily Reading Master
Log'!B$3:B$211<=DATEVALUE("2/28")),'Daily Reading Master
Log'!BW$3:BW$211)/SUMPRODUCT(--('Daily Reading Master
Log'!B$3:B$211=DATEVALUE("02/01")),--('Daily Reading Master
Log'!B$3:B$211<=DATEVALUE("2/28")))

Problem:
Where this calculation is performed on a set of data that has no values, I
get the 'DIV/0' error. *I understand why this occurs, however:

Question:
How can i add an 'IF' component to this equation, such that if the result of
hte calculation is 'DIV/0, display 'N/A', rather than the DIV/0 error

Many thanks in advance,

--
Carlee


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 155
Default Where no value, display "NA" - if statement?

this worked brilliantly. thanks so much.
--
Carlee


"Pete_UK" wrote:

You get #DIV/0 when the denominator is zero, so this is what you need
to check for. Try this:

=IF(SUMPRODUCT(--('Daily Reading Master Log'!B$3:B
$211=DATEVALUE("02/01")),--('Daily Reading Master Log'!B$3:B
$211<=DATEVALUE("2/28")))=0,"NA",SUMPRODUCT(--('Daily Reading Master
Log'!B$3:B$211=DATEVALUE("02/01")),--('Daily Reading Master Log'!B$3:B
$211<=DATEVALUE("2/28")),'Daily Reading Master Log'!BW$3:BW$211)/
SUMPRODUCT(--('Daily Reading Master Log'!B$3:B
$211=DATEVALUE("02/01")),--('Daily Reading Master Log'!B$3:B
$211<=DATEVALUE("2/28"))))

Hope this helps.

Pete

On Jan 28, 6:15 pm, Carlee wrote:
Good morning all,

Issue: I use the following formula to display data:

=SUMPRODUCT(--('Daily Reading Master
Log'!B$3:B$211=DATEVALUE("02/01")),--('Daily Reading Master
Log'!B$3:B$211<=DATEVALUE("2/28")),'Daily Reading Master
Log'!BW$3:BW$211)/SUMPRODUCT(--('Daily Reading Master
Log'!B$3:B$211=DATEVALUE("02/01")),--('Daily Reading Master
Log'!B$3:B$211<=DATEVALUE("2/28")))

Problem:
Where this calculation is performed on a set of data that has no values, I
get the 'DIV/0' error. I understand why this occurs, however:

Question:
How can i add an 'IF' component to this equation, such that if the result of
hte calculation is 'DIV/0, display 'N/A', rather than the DIV/0 error

Many thanks in advance,

--
Carlee



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Where no value, display "NA" - if statement?

You're welcome - thanks for feeding back.

Pete

On Jan 28, 7:49*pm, Carlee wrote:
this worked brilliantly. *thanks so much.
--
Carlee



"Pete_UK" wrote:
You get #DIV/0 when the denominator is zero, so this is what you need
to check for. Try this:


=IF(SUMPRODUCT(--('Daily Reading Master Log'!B$3:B
$211=DATEVALUE("02/01")),--('Daily Reading Master Log'!B$3:B
$211<=DATEVALUE("2/28")))=0,"NA",SUMPRODUCT(--('Daily Reading Master
Log'!B$3:B$211=DATEVALUE("02/01")),--('Daily Reading Master Log'!B$3:B
$211<=DATEVALUE("2/28")),'Daily Reading Master Log'!BW$3:BW$211)/
SUMPRODUCT(--('Daily Reading Master Log'!B$3:B
$211=DATEVALUE("02/01")),--('Daily Reading Master Log'!B$3:B
$211<=DATEVALUE("2/28"))))


Hope this helps.


Pete


On Jan 28, 6:15 pm, Carlee wrote:
Good morning all,


Issue: *I use the following formula to display data:


=SUMPRODUCT(--('Daily Reading Master
Log'!B$3:B$211=DATEVALUE("02/01")),--('Daily Reading Master
Log'!B$3:B$211<=DATEVALUE("2/28")),'Daily Reading Master
Log'!BW$3:BW$211)/SUMPRODUCT(--('Daily Reading Master
Log'!B$3:B$211=DATEVALUE("02/01")),--('Daily Reading Master
Log'!B$3:B$211<=DATEVALUE("2/28")))


Problem:
Where this calculation is performed on a set of data that has no values, I
get the 'DIV/0' error. *I understand why this occurs, however:


Question:
How can i add an 'IF' component to this equation, such that if the result of
hte calculation is 'DIV/0, display 'N/A', rather than the DIV/0 error


Many thanks in advance,


--
Carlee- Hide quoted text -


- Show quoted text -


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
How do I change the column heading in Excel to display "A" "B" "C Thai New Users to Excel 1 November 30th 07 08:06 PM
My Column display as "numbers" instead of "alphabets" ali Excel Discussion (Misc queries) 1 October 24th 07 05:16 AM
Format cell to display "Y" or "N"when entering a 1 or zero Brad Excel Discussion (Misc queries) 7 February 8th 07 06:50 PM
embedding "ISERROR" function into an "IF" statement [email protected] Excel Worksheet Functions 8 January 4th 07 12:01 AM
How do display a "+" or "-" sign when hiding columns? DTI Tustin Setting up and Configuration of Excel 1 July 13th 06 01:21 PM


All times are GMT +1. The time now is 12:51 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"