Date in IF Statement

JTL9161

Active Member
Joined
Aug 29, 2012
Messages
493
Office Version
  1. 365
Platform
  1. Windows
I searched around but could not find my answer so I thought I would try here. It's probably something simple.

I am copying data from a spreadsheet listing to an invoice bill on another tab within the same spreadsheet.


Spreadsheet (Sheet1) has dates and payments. I am saying in the on the Invoice Tab (Sheet2)

=IF(Sheet1!A1="","",A1) which is saying if cell A1 does not have a date then leave it blank on the Invoice tab

but if cell A1 does have a date then show that date on the Invoice Tab.

When its blank it shows blank but when the date say 5/1/2016 the date shown on the Invoice tab is 1/0/1900

and I have the cell formatted for DATE mm/dd/yyyy.

Suggestions?

Thanks,
James
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

robertdseals

Active Member
Joined
May 14, 2008
Messages
327
Office Version
  1. 2010
Platform
  1. Windows
It doesn't look like you have a date in cell A1 of the Invoice tab. Are you perhaps trying to do this?
=IF(Sheet1!A1="","",Sheet1!A1)
 
Upvote 0

Dave Patton

Well-known Member
Joined
Feb 15, 2002
Messages
5,750
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
The cell A1 may be TEXT.
Try coercing the data to a number by adding 0 =IF(Sheet1!A1="","",A1+0)
If there are non-printing characters, review information on Excel's Clean and Trim.

As Robert mentioned, ensure that you are referencing the correct cell
=IF(Sheet1!A1="","",Sheet1!A1)
 
Last edited:
Upvote 0

JTL9161

Active Member
Joined
Aug 29, 2012
Messages
493
Office Version
  1. 365
Platform
  1. Windows
DOH! I knew I needed another set of eyes! Thanks.
 
Upvote 0

Forum statistics

Threads
1,191,120
Messages
5,984,762
Members
439,909
Latest member
daigoku

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