Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks, i didn't think of it but luckily for me the date and my windows are
in dmy format, rgds, david "Dave Peterson" wrote: Be careful. If I do this kind of thing with my USA settings (mdy order), I may end up with dates--but they may not be the ones I want. For instance: 01/02/03 would change to January 2, 2003 for me. If your windows regional settings have your short date in dmy format, you should be ok. But you may want to make a note of a value and then do your conversion. Then give that cell an unambiguous date format (mmmm dd, yyyy) to see if it's what you expect. I like to do this if my "dates" are in a single column select the column data|text to columns fixed width (remove all lines) and choose date dmy (to match the data) and finish up. If I need a macro, I'd record one when I did it manually. dn wrote: Many thanks, this worked perfectly. in a nut shell, i imported dates into excel in dd/mm/yy , for some reason excel read it as if it was text and not a number, however, i found out that if you just used F2 and Enter, it was able to read it as a number so i was trying to do this through a macro. your proposal worked just fine. many thanks "Dave Peterson" wrote: I don't know what you're doing, but sending keystrokes is not usually a good way to do things. Maybe: with activecell .value = .value 'or .formula = .formula end with There may be much better ways of doing what you need. dn wrote: Many thanks, can you pls let me know what's the key name for "Enter" i have tried : Application.SendKeys "{F2}" Application.SendKeys "{Enter}" and it doesn't work rgds, david "witek" wrote: dn wrote: when you record a macro hitting the F2 in a cell that contains 444, the result is: ActiveCell.FormulaR1C1 = "444" i would like the code just to record the action of hitting the F2 not of writing the existing cell formula Application.SendKeys "{F2}" -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel-hitting tab moves me more than one column over | Excel Discussion (Misc queries) | |||
how to release anchored cell in EXCEL when hitting "esc" fails? | Excel Discussion (Misc queries) | |||
How can I create a new line in a cell in Excel by hitting enter? | Excel Discussion (Misc queries) | |||
hitting spacebar in excel deletes last character entered. | New Users to Excel | |||
excel macro - macro initiation upon hitting the ener key | Excel Programming |