Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default cell formula question

I am using the following formula in one of my cells: "=C1 / D2".
The problem with this formula is that the result will be "#DIV/0!"
if cell D2 contains no data.

Can I somehow fix my formula so it does NOT return any value
if either C1 or D2 is empty? I just want to avoid situations when
the outuput of my formula is "#DIV/0!" or "#Value#" because it
just doesn't look pretty to me, hahah!

Thank you!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default cell formula question

Try =IF(ISNA(C1/D2;"";C1/D2)

Jan

On 18 Maj, 10:08, "Robert Crandal" wrote:
I am using the following formula in one of my cells: "=C1 / D2".
The problem with this formula is that the result will be "#DIV/0!"
if cell D2 contains no data.

Can I somehow fix my formula so it does NOT return any value
if either C1 or D2 is empty? * I just want to avoid situations when
the outuput of my formula is "#DIV/0!" or "#Value#" because it
just doesn't look pretty to me, hahah!

Thank you!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default cell formula question

Actually

=IF(ISERROR(C1/D2;"";C1/D2)

is better

On 18 Maj, 11:16, jkrons wrote:
Try =IF(ISNA(C1/D2;"";C1/D2)

Jan

On 18 Maj, 10:08, "Robert Crandal" wrote:



I am using the following formula in one of my cells: "=C1 / D2".
The problem with this formula is that the result will be "#DIV/0!"
if cell D2 contains no data.


Can I somehow fix my formula so it does NOT return any value
if either C1 or D2 is empty? * I just want to avoid situations when
the outuput of my formula is "#DIV/0!" or "#Value#" because it
just doesn't look pretty to me, hahah!


Thank you!- Skjul tekst i anførselstegn -


- Vis tekst i anførselstegn -


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default cell formula question

Another way but only if all users have 2007+

=IFERROR(A1/B1,"")

in 97-2003 use ISERROR as suggested by jkrons

Regards,
Peter T

"jkrons" wrote in message
...
Actually

=IF(ISERROR(C1/D2;"";C1/D2)

is better

On 18 Maj, 11:16, jkrons wrote:
Try =IF(ISNA(C1/D2;"";C1/D2)

Jan

On 18 Maj, 10:08, "Robert Crandal" wrote:



I am using the following formula in one of my cells: "=C1 / D2".
The problem with this formula is that the result will be "#DIV/0!"
if cell D2 contains no data.


Can I somehow fix my formula so it does NOT return any value
if either C1 or D2 is empty? I just want to avoid situations when
the outuput of my formula is "#DIV/0!" or "#Value#" because it
just doesn't look pretty to me, hahah!


Thank you!- Skjul tekst i anførselstegn -


- Vis tekst i anførselstegn -



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default cell formula question

Robert,

This will return a blank cell unless both cells have a number in

=IF(COUNT(C1,D2)=2,C1/D2,"")

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Robert Crandal" wrote:

I am using the following formula in one of my cells: "=C1 / D2".
The problem with this formula is that the result will be "#DIV/0!"
if cell D2 contains no data.

Can I somehow fix my formula so it does NOT return any value
if either C1 or D2 is empty? I just want to avoid situations when
the outuput of my formula is "#DIV/0!" or "#Value#" because it
just doesn't look pretty to me, hahah!

Thank you!


.

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
EASY QUESTION: Formula to add filename to cell Chip Pearson Excel Programming 0 January 20th 07 01:49 AM
Bolding Specific Cell Formula Question bodhisatvaofboogie Excel Discussion (Misc queries) 1 May 19th 06 03:06 PM
question about cell reference in a formula [email protected] Excel Discussion (Misc queries) 1 April 5th 06 08:55 AM
Excel question? Regarding cell formula Kristin Excel Worksheet Functions 7 April 1st 05 10:30 PM
Question: Cell formula or macro to write result of one cell to another cell Frederik Romanov Excel Programming 1 July 8th 03 03:03 PM


All times are GMT +1. The time now is 12:48 AM.

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

About Us

"It's about Microsoft Excel"