Simple Formula Is Killing Me

rockyw

Well-known Member
Joined
Dec 26, 2010
Messages
1,191
I know this has to be simple. I want to return the date in a cell and if it's blank it returns nothing. The date is moving into thr cell for code so it is blank. Right now I get 1/0/0. Thanks
 

Some videos you may like

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,914
Office Version
  1. 365
Platform
  1. Windows
What is the formula in your cell?
 

Fishboy

Well-known Member
Joined
Feb 13, 2015
Messages
4,261
I know this has to be simple. I want to return the date in a cell and if it's blank it returns nothing. The date is moving into thr cell for code so it is blank. Right now I get 1/0/0. Thanks
Hi Rocky,

To be honest what you just said doesn't really make much sense, or at least we have not got enough information...

If cell (let's say A1) is not blank then another cell (let's say B1) is supposed to be returning a date. If A1 is blank however, B1 should not return a date. Is that generally the idea (give or take the actual cells being the right ones I mean)?

If I have the right idea then the formula in B1 would be something like =IF(A1<>"",TODAY(),"")

Or are you trying to do this with VBA?
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,914
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

It it is putting in today's date, how can it be blank?

Can you walk us through exactly what is going on, and post your exact formulas, if you have any?
 

rockyw

Well-known Member
Joined
Dec 26, 2010
Messages
1,191
OK the cell is blank until a code puts in a date. I used =Data!I4 but I get a 1/0/0 when the cell is empty. A code puts a date in and removes it later. I would like to see the date and nothing when the date is gone. Thanks
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,914
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

Try this instead:
Code:
=IF(Data!I4,Data!I4,"")
 

Fishboy

Well-known Member
Joined
Feb 13, 2015
Messages
4,261
OK the cell is blank until a code puts in a date. I used =Data!I4 but I get a 1/0/0 when the cell is empty. A code puts a date in and removes it later. I would like to see the date and nothing when the date is gone. Thanks
To be honest that still doesn't quite fit how I would expect it to work, however would it not be something like...

=IF(Data!I4<>"",Data!I4,"")
 
Last edited:

dave3009

Well-known Member
Joined
Jun 23, 2006
Messages
7,002
Office Version
  1. 365
  2. 2016
Assuming the cell is blank before the VBA code puts the date in then maybe

Rich (BB code):
=IF(Data!I4, Data!I4, "")


Will return blank if cell
Data!I4 is empty, or the value from that cell if not.
 

rockyw

Well-known Member
Joined
Dec 26, 2010
Messages
1,191
Yes that works. It returns the dates and blank where there is none, thanks I looked and looked for an answer. Thanks
 

Watch MrExcel Video

Forum statistics

Threads
1,122,371
Messages
5,595,784
Members
414,020
Latest member
Meghdad

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top