A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Return 0 if cell has data, of copy if it doesn't



 
 
Thread Tools Display Modes
  #1  
Old April 9th, 2010, 07:31 PM posted to microsoft.public.excel.worksheet.functions
kathysonisland
external usenet poster
 
Posts: 3
Default Return 0 if cell has data, of copy if it doesn't

This was what I needed, Thank you! But now it leads me to the next
step.....(probably would be easier to just enter the $0 myself)

Here is what I need: the 'simple' spreadsheet is for refunds we owe
clients. Column D is refund owing, Column G is date mailed, H represents $0
balance, which is the formula I was just given. Now, how do I fix the
formula to actually display the amount of refund due from Column D IF column
G isn't populated, but if it does have a date mailed then H would display $0?

I should have asked this in the first place. Sorry.

"Joe User" wrote:

"kathysonisland" wrote:
I need a formula to display 0 in a cell if another cell has a date.


Is the following sufficient?

=if(isnumber(A1), 0, "")

That returns zero if A1 ("the other cell") has a number, which includes a
date. Otherwise, it returns the null string, leaving the cell appear blank.

If you truly need to distinguish between a date and other numbers, I think
you need to write a UDF (VBA function). Is that necessary?

Also, I ass-u-me that "the other cell" contains a numeric date, not text
that looks like a date. In other words, TYPE(A1) is 1, not 2.


  #2  
Old April 9th, 2010, 07:46 PM posted to microsoft.public.excel.worksheet.functions
Luke M[_4_]
external usenet poster
 
Posts: 451
Default Return 0 if cell has data, of copy if it doesn't

=IF(ISNUMBER(G2),0,D2)

--
Best Regards,

Luke M
"kathysonisland" wrote in message
...
This was what I needed, Thank you! But now it leads me to the next
step.....(probably would be easier to just enter the $0 myself)

Here is what I need: the 'simple' spreadsheet is for refunds we owe
clients. Column D is refund owing, Column G is date mailed, H represents
$0
balance, which is the formula I was just given. Now, how do I fix the
formula to actually display the amount of refund due from Column D IF
column
G isn't populated, but if it does have a date mailed then H would display
$0?

I should have asked this in the first place. Sorry.

"Joe User" wrote:

"kathysonisland" wrote:
I need a formula to display 0 in a cell if another cell has a date.


Is the following sufficient?

=if(isnumber(A1), 0, "")

That returns zero if A1 ("the other cell") has a number, which includes a
date. Otherwise, it returns the null string, leaving the cell appear
blank.

If you truly need to distinguish between a date and other numbers, I
think
you need to write a UDF (VBA function). Is that necessary?

Also, I ass-u-me that "the other cell" contains a numeric date, not text
that looks like a date. In other words, TYPE(A1) is 1, not 2.




  #3  
Old April 9th, 2010, 07:47 PM posted to microsoft.public.excel.worksheet.functions
Joe User[_2_]
external usenet poster
 
Posts: 757
Default Return 0 if cell has data, of copy if it doesn't

"kathysonisland" wrote:
Column D is refund owing, Column G is date mailed
[....] how do I fix the formula to actually display the
amount of refund due from Column D IF column G
isn't populated, but if it does have a date mailed then
H would display $0?


=if(isnumber(G1), 0, D1)

By the way, it might be sufficient to write if G1 only contains a date or
nothing:

=if(G1"", 0, D1)

PS: In the future, please do not duplicate questions, and do not separate
follow-ups from the original discussion. It only serves to create confusion.


----- original message -----

"kathysonisland" wrote:
This was what I needed, Thank you! But now it leads me to the next
step.....(probably would be easier to just enter the $0 myself)

Here is what I need: the 'simple' spreadsheet is for refunds we owe
clients. Column D is refund owing, Column G is date mailed, H represents $0
balance, which is the formula I was just given. Now, how do I fix the
formula to actually display the amount of refund due from Column D IF column
G isn't populated, but if it does have a date mailed then H would display $0?

I should have asked this in the first place. Sorry.

"Joe User" wrote:

"kathysonisland" wrote:
I need a formula to display 0 in a cell if another cell has a date.


Is the following sufficient?

=if(isnumber(A1), 0, "")

That returns zero if A1 ("the other cell") has a number, which includes a
date. Otherwise, it returns the null string, leaving the cell appear blank.

If you truly need to distinguish between a date and other numbers, I think
you need to write a UDF (VBA function). Is that necessary?

Also, I ass-u-me that "the other cell" contains a numeric date, not text
that looks like a date. In other words, TYPE(A1) is 1, not 2.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:42 AM.


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