Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default return 0 if cell has data?

I feel stupid asking this question.......I just cannot figure a formula out
that I know I know.........

I need a formula to display 0 in a cell if another cell has a date.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 905
Default return 0 if cell has data?

"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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default return 0 if cell has data?

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.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 905
Default return 0 if cell has data?

"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)


----- 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.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 905
Default return 0 if cell has data?

I wrote:
=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)


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

"Joe User" wrote:
"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)


----- 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.

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
Return a cell from more than just one row of data lindsayhyle Excel Discussion (Misc queries) 6 August 20th 07 06:50 PM
How do i return data in a cell from the referred cell? SunnyWantsome Excel Worksheet Functions 2 August 20th 07 04:52 AM
Return Data from Specified Cell Series Cheri Excel Discussion (Misc queries) 3 July 20th 06 03:51 AM
Can CELL Return Multiple Data Locations? Val Excel Worksheet Functions 3 May 18th 06 02:35 AM
How do you make cell 2 return data if cell 1 contains text? jermsalerms Excel Discussion (Misc queries) 3 January 5th 06 10:44 PM


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