Re: Scripting Excel: How to find values in cells of kind date
Re: Scripting Excel: How to find values in cells of kind date
- Subject: Re: Scripting Excel: How to find values in cells of kind date
- From: Doug McNutt <email@hidden>
- Date: Sun, 16 Sep 2007 17:44:51 -0600
At 19:14 +0200 9/16/07, Andreas Schumacher wrote:
>I am posting the first time here, so please be patient with my question ;)
>
>I want to find cells in Excel 2004, which contain the first day of each month in a time row.
>In Excel the cells are formatted like this: 15.06.2007, 16.06.2007
If you have the option to muck with the worksheet you can add another column and hide it if you want.
In row 2 of the new column put something like
= IF(MONTH(A2) = MONTH(A1), "", "new")
and fill down.
That will give you something to search for in the new column but it does require that the rows be sorted by date. If you copy and paste values into the new column you can sort all of those first days into adjacent rows.
You can also make the new column contain something like this:
=TEXT(A1, "mmm")
and fill down.
That will place just named months in the new column.
=TEXT(A1, "mm") will provide numbered months
=TEXT(A1, "dd")
will populate the new column with day of the month as decimal day numbers that AppleScript ought to understand.
=TEXT(A1, "(mm,dd)") might even become an AppleScript list but that's pushing it.
And by the by. . . VBA is no harder to learn than AppleScript and the help files are seriously better than AppleScript dictionaries.
And. . . Excel date/time values can be thought of as floating point numbers that count days and fractions of a day from the start of 1904 unless you opt to use the Windows convention which starts from day 1 of 1900 and has a known error of one day before Feb 29 1900 which didn't exist.
--
--> From the U S of A, the only socialist country that refuses to admit it. <--
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden