Excel 2007: Editing a date value deletes the date format - excel

In an Excel 2007 spreadsheet when I edit a date value the date format of the cell is deleted and I cannot re-apply it with the toolbar options, format > format cells > number > date.
Prior to editing the date value the cell is displayed in the formula bar as 2017/07/15 (for example) but after an edit it displays as ^2017/07/26.
The onset of the problem was sudden and it affects all my Excel 2007 spreadsheets, old and newly created.
I have Goggled the problem and posted a question in MS Forums but without result.
Any help would be appreciated.
Additional Information - Update Oct 3
I have found a January 6, 2016 Stack Overflow question about Excel 2013 date format changes caused by editing and one of the answers seems to be relevant to my question. The cells I am attempting to edit have typed (non-formula) dates in them.
Quote from Date Format changes when editing a cell in Excel 2013
Answer by Jeeped
… When you edit a cell with a typed (non-formula) date, you are editing the Range.Formula property which in this case is the same as the Range.Value property. The displayed (formatted) date is the Range.Text property. The Range.Formula is the same as that which is seen in the formula bar and the stored format for a typed date is taken from the computer system's regional Short Date setting. The Range.Text property is subject to a formatting mask that changes the way the Range.Value is displayed. Consider it an overlay of the actual value; e.g. if you want to change something, change the something, not a picture of the something.
If you were allowed to edit the displayed text, you would never be able to edit a formula because the values being edited would always be the formula's result (formatted appropriately) and not the formula itself.
If this is really mission critical or just obsessively annoying, change your computer system's Short Date to dd-mm-yyyy and Excel will use that as the base Range.Formula property.
End of quote
This quote gives links to the Microsoft Dev Center ,
https://msdn.microsoft.com/VBA/Excel-VBA/articles/range-formula-property-excel
I am a basic user of Excel and assuming the above information can be used to solve my editing problem then my problem now becomes how do I use this information?
It is less pressing, but I am also curious about why an editing feature I had been using for a long time suddenly stopped working.
Problem Fixed – Update Oct 20
#a-burge: Thanks for taking an interest in this problem but I have fixed the problem so I am answering my own question.
I use Windows 7 Ultimate SP1 and Microsoft Office 2007 SP3 which have always been updated automatically through Windows 7 > start > control panel > windows update.
The sequence of selections, Windows 7 > start > control panel > region and language, leads to a page with tabs that include a "formats" tab and a "location" tab. Under the former the language setting was "English (New Zealand)" and under the latter the location setting was "New Zealand".
The problem was fixed by changing the language setting to "English (United States)". The location setting was left unchanged.
This fixes the problem but I do not understand how a language setting in the control panel of Windows 7 can have the effect it does on editing a date in an Excel 2007 spreadsheet?
I think a family member who also uses the computer must have changed the language setting which would account for the sudden onset of the problem and its simple solution.
This is not the first time I have had a problem caused by a language setting in a Microsoft product. In Word 2007 the autocorrect option that I use to expand abbreviations when writing may suddenly stop working. This is caused by the variant of English changing from one part of the document to another. The solution is Word 2007 > select all > set language but that may need to be repeated several times in one document depending on the editing.
These problems raise the question of why Microsoft provides 16 variants of English in Windows 7 when the differences between them are trivial. It even provides English(Australia) and English(New Zealand) and English(United Kingdom) which is an absurd level of redundancy.

Related

Why does carriage return in excel is not reflected when excel value is imported in UFT

I am using Excel to compare error messages. My error message looks like this .
You have changed the values.
Do you want to continue?
I entered this value in excel using Alt+Enter, when reading this value from UFT, this carriage return is not considered.
How to include carriage return in excel so that it is visible when reading the values from UFT?
First, try to create a string formula, i.e. instead of entering the line break in the string, create a formular like
="<value>"
where <value> is the string value that you originally wanted in your cell, with the line feed contained within the quotation marks.
This might solve your issue.
But:
This is just the top of the mountain of known issues with UFTs data table API. Here is an incomplete list of additional issues (some of which, but not all, are fixed or at least improved upon in 15+):
Date values are not properly handled, especially if you are using a
non-US locale and try to consume values auto-formatted by Excel as
dates
Strange things happen if you have an .xls file. Use an .xlsx file instead. (This used to be the other way around). Note it is not only the extension I am referring to, but also the format (Excel-95 vs. more modern format)
Many formulas are unsupported Formatting behavior differentfrom what Excel would do/show
CRs and LFs are handled differently
from what Excel does
Built-in table editor is quite a silo of bugs
and antiergonomic cell values are limited in length; at the same
time, formulas have different length limits. I.e. a string in a cell is
limited to a certain maximum number of characters, but a formular
returning a string does not have that (but maybe a higher) length
limit
Because of this (and more), we auto-convert all excel sheets on the fly before when we use them in UFT after they have been updated. To do this, we are using Excel Interop (i.e. Excel´s COM automation interface) to spawn an Excel instance, create a converted version that has all formulas and formatting resolved to just string formulars, and use the converted sheets with UFTs DataTable.ImportSheet feature. Which means we unfortunately need Excel on all execution machines.
So my recommendation would be to stay away from the data table editor in UFT. Use Excel, and make sure all your edits come through to UFT in a meaningful way. If they don´t, consider a converter that creates a DataTable-compatible copy of your sheet.
Yes, I know this is suboptimal, but that´s what it has come down to after years and years of struggling with the DataTable API and UFTs "superb" built-in data table editor.

Excel 365 - Open csv files automatically (list separator solution not working)

If I opened a csv file, Excel used to automatically format it into columns. At some point in the past Excel just stopped doing this.
I'm using Office 365 Business, Excel version 1803. Windows 10 ver 1709
I want to be able to double click on a csv file and have it open automatically formatted into columns.
This is not machine specific as my coworker has an identical issue on a different brand of computer.
So far I have tried the following:
Changing the list separator: I cannot find the list separator setting in office 365, I think it may have been buried or removed.
The "decimal separator" is a comma.
Creating a simple csv to test with. I tested with this csv and it still has the same problem:
Date,Count
2018-01-02,22
2018-01-03,24
I do know I can use text to columns and write macros to accomplish this. I want to avoid those if possible so I can just open a csv and it's formatted.
Thanks, any insights here would be great. I am really hoping it is some system or excel setting.
I came across this and I hope that 1 year and 10 months later it will still help somebody.
Had the same problem and solved it by "Change date, time or number formats" in the Control Panel.
Standard the Format is "Match Windows display language"
My Windows is in English (list separator = ",") but I live in Belgium where the list separator is ";"
So in formats, I changed the Format to "Dutch (Belgium)". That solved it for me.
Once you change your country, double-check in "Additional Settings" if the separator is what you want. Keep in mind that also other things might change, such as decimal symbol and digit grouping symbol.
If you don't want that, you might only want to change the separator and don't change the country.
Best regards,
Koen

Excel showing weird thousand separator

I use Microsoft Excel 2010 and my Excel shows thousand separators in a really weird manner. It has been doing so ever since I installed it, so this is not due to something that I changed later. You can see in the pic below how my Excel separates thousands in a big number:
This is through the default Comma Style format. I have even tried to make it custom by setting it to #,### and #,##0.00 but it still shows the same weird separation. Any idea how this can be fixed?
By default, MS Excel uses computer regional settings when displaying number or date formats.
Go to Control Panel, Regional Settings/Region and Language(it depends by operating system) and select a different country if necessary, but especially check Number Format (Additional Settings). See Digit grouping symbol and Digit grouping.
Change Digit grouping to 123,456,789:
Found the solution.
The issue was in the Regional settings. My Digit Grouping in the Numbers tab and Currency tab were different. Once I set them both to the same format, Excel stopped showing me the random grouping it was showing earlier.
Thanks everyone for pointing me in the right direction.

Ensuring DatePicker is available in VBA

I have a question to which I couldn't really find an answer for with a Google Search. I'm working on a VBA assignment, one of the sections requires the user to enter a start and end date which will be used to filter through a set of data. I have been using the DatePicker package and it has been working fine. I then emailed my assignment (to myself) to work on later on, and noticed that the DatePickers don't show up on the forms. When I open my assignment, an error message pops up saying "Could not load some objects because they are not available on this machine". Now, the Date Pickers are already installed on the computer I am using, but they have to be added through the menus in excel.
Anyway, I was just wondering if there is anyway I can ensure that the date pickers will be available with the Excel file that I eventually submit. Otherwise, I will have to input the dates through another mechanism (which is fine, but the Date Pickers provide a nicer visual than the drop down lists of Day, Month, Year.
I hope this question is clear and thank you for any help
Excel does not have a date picker calendar control out of the box that seamlessly works in all versions. There are some ActiveX controls that can be used in earlier versions, but they won't work with later versions.
Ron de Bruin has written a VBA data picker tool that works in all Excel versions and has a collection of info about the calendar control on his page here: http://www.rondebruin.nl/win/s8/win003.htm

SSRS date format in Excel with localization

I'm trying to export a SQL Server 2008 R2 Reporting Services report to Excel. The report has a column of dates. The date is stored as a datetime in the SQL server.
The language of the report is set to =User!Language, the format of the date-cell is d.
When exporting/rendering the report to PDF, everything is displayed in the locale of the request made by the browser (Accept-Language).
When rendering to Excel however, the format suddenly changes, for example, to General ([$-10409]M.T.JJJJ) (German Excel, locale of the OS set to de-AT, browser-locale is en-US).
This means that the Excel displays dates in a completely wrong format - the sequence of day, month and year is hardcoded and only the separator comes from the current locale. This makes sharing reports between different OS languages almost impossible since a report generated from a d-m-yyyy country will still display as day-month-year in a country with different date formatting (and vice versa). So any person expecting a m/d/yyyy formatted date will get d/m/yyyy.
This is especially dangerous if there are no dates with days above 12 - ie: it is very likely to misread the displayed date because there is no obvious error.
When manually setting the cell-format in Excel to date, everything seems fine and the format changes with the locale of the OS.
Is there any possibility to force the cell to be formatted as Date in Excel without having to edit the Excel file itself?
P.S: numbers are also not formatted as a number but as [$-10409]#.##0,00;-#.##0,00 - which is less of an issue but still potentially a source of errors. (format in the report is N2)
I've manages to solve similiar issue. Solution is rather simple.
In report editor, open Design view and select field, which you want to edit, right mouse click and choosee either Expression or Textbox properties. The rest is very intuitive as in Excel editor.

Resources