If cell contains a date then link to another cell

Danskylansky

New Member
Joined
Mar 10, 2016
Messages
2
Hi All

I am trying to use an If statement to return a particular amount if a corresponding cell, on another table has a date (only - if it contains anything else i need it to be blank. Here are the tables:
Table 1:
InitialsDay 0Day 7Day 14Delivery
$500$300$800$1500
M001$500$300
M002$500$1500

<tbody>
</tbody>
Table 2:
InitialsDay 0Day 7Day 14Delivery
M00101/01/201605/02/201608/03/2016
M00203/01/2016NANA12/03/2016

<tbody>
</tbody>

I need the correct IF Statement to be applied on the first table: =if('table2'B2=date,'table1'B2,""). I realise that just using =date is not correct, but can't workout the correct function name to use
My problem is getting the if statement to only recognise if a date has been used in the corresponding cell.

Any help would be appreciated

Thanks
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
try

=if(isnumber('table2'B2),'table1'B2,"")
 
Upvote 0
Code:
Function dat(ByVal r As Range) As Boolean
If r.NumberFormatLocal = "mm/dd/yyyy" Then
dat = True
Else
dat = False
End If
End Function
=if(dat('table2'B2),'table1'B2,"")
 
Upvote 0

Forum statistics

Threads
1,215,561
Messages
6,125,533
Members
449,236
Latest member
Afua

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
Back
Top