Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Removing #N/A from an "If/Then" statement

I'm doing some report making for my job, and pieced together this formula:

=IF(D9=0,NA(),D9) with base formula of =IF(hostcell=0,NA(),hostcell)

The formula has worked wonderfully, but it leaves "#N/A" in the cell and my supervisor would like to not see anything within the table, as they are being included in this report.

Does anyone know how this could be achieved?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default Removing #N/A from an "If/Then" statement

Hi Collin,

Am Thu, 9 May 2013 07:53:32 -0700 (PDT) schrieb Collin Ulvund:

=IF(D9=0,NA(),D9) with base formula of =IF(hostcell=0,NA(),hostcell)

The formula has worked wonderfully, but it leaves "#N/A" in the cell and my supervisor would like to not see anything within the table, as they are being included in this report.


try:
=IF(D9<0,D9,"")


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 829
Default Removing #N/A from an "If/Then" statement

"Claus Busch" wrote:
Am Thu, 9 May 2013 07:53:32 -0700 (PDT) schrieb Collin Ulvund:
=IF(D9=0,NA(),D9) with base formula of =IF(hostcell=0,NA(),hostcell)
[....] it leaves "#N/A" in the cell and my supervisor would
like to not see anything within the table, as they are being
included in this report.

try:
=IF(D9<0,D9,"")


There is no reason to change the logic from D9=0 to D9<0. The following
will work just as well:

=IF(D9=0,"",D9)

The advantage: if you have a lot of these formulas, you can use
Find-and-Replace to change them en masse. It is easy if they are grouped
together or in large groups. Select the range of formulas to change, press
ctrl+F, enter NA() in the "Find what" field, enter "" (two double quotes
next to each other ) in the "Replace with" field, and click on Replace All.

Caveat: NA() might have been chosen for a reason; for example, if you use
the range of values in a chart. Also, other formulas might depend on the
Excel error result; for example, using ISNUMBER(E9) somewhere else. It
would be prudent to copy the Excel file before making the change.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Removing #N/A from an "If/Then" statement

The previous two formulas have been helpful, but unfortunately within my graphs, the formulas send the line to the baseline of the chart, making the chart look incorrect. Is there any way that this could be achieved without a placeholder within the table?
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default Removing #N/A from an "If/Then" statement

Hi Collin,

Am Thu, 9 May 2013 08:37:03 -0700 (PDT) schrieb Collin Ulvund:

The previous two formulas have been helpful, but unfortunately within my graphs, the formulas send the line to the baseline of the chart, making the chart look incorrect. Is there any way that this could be achieved without a placeholder within the table?


select your diagram = Diagram tools = Select data = Settings for
hidden data or null values = Connect data points with line

Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
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 - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
embedding "ISERROR" function into an "IF" statement [email protected] Excel Worksheet Functions 8 January 4th 07 12:01 AM
Call a sub statement in "Personal Macro Workbook" from "ThisWorkbo QC Coug Excel Programming 1 August 26th 05 07:09 PM
vba: How do I write a "For Each Statement" nested in a "With Statement"? Mcasteel[_32_] Excel Programming 0 November 8th 04 10:04 PM
vba: How do I write a "For Each Statement" nested in a "With Statement"? Mcasteel[_29_] Excel Programming 0 November 8th 04 09:08 PM


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