Date is not recognized as date until cell has been edited

Pitoun

New Member
Joined
Jun 23, 2015
Messages
17
Hello,

I have a strange behaviour on my sheet.

I start with bouton "Planifier" on second tab called "Feuille2"
Then I enter user name Samia, select "Maladie" Type and add dates from 03.12.2018 to 05.12.2018 and press bouton "Ajouter"

This action well add a record after the last line into first tab called "input" (Input:B430:F430). Cell format is correctly set as "date" on cells D430:E430

Problem : on second tab called "Feuille2" should appear an M on december 3,4 and 5 (Feuille2:F69:H69)

Solution : on first tab called "input" I click to edit cell D430 [F2 key] and press [Enter] key. I do same on cell E430
Then the formula on second tab called "Feuille2" can read date and display an M in december correcponding cells.


I can't figure out why dates are not recognized as date until cell has been edited.

You need to download the file to get macro bouton working. Macro will not show if opened in a browser. My spreadsheet is available here.

Many thanks for any help

Pit
 
Last edited:
should be replaced by :

Code:
[COLOR=#333333]Sheets("Input").Range("d" & dlt) = CDate(TextBox3.Value)[/COLOR]
[COLOR=#333333]Sheets("Input").Range("e" & dlt) = CDate(TextBox4.Value)[/COLOR]

Hope this will help

Dear James006. Your solution is THE SOLUTION. Yes it works.

Thank you very much:)
 
Upvote 0

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
You are welcome ...:wink:

Thanks for your Thanks ... :smile:
 
Upvote 0

Forum statistics

Threads
1,223,956
Messages
6,175,612
Members
452,661
Latest member
Nonhle

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