Hi!
My English is not so good either. Do you want me to answer in Swedish...? Kidding. ;D
I think I can see what you are trying to do.
=DEEL(TEKST(WEEKDAG(DAG(A2)&"-"&MAAND(C$1)&"-"&$A$1);"ddd");1;2)
First of all, I get Err: 502 in all of those cells and now I am going to find out why...
In this case, A2 contains "1" which in Calc date (and Excel too I suppose) means 31 december 1899. I suppose you were rather looking for 1 january 2005 in this case which is 38353, not 1.
So let's analyze the rest of the formula:
DAG(A2) = DAG(1) = 31.
MAAND(C1)=MAAND("jan") = 1.
A1 = 2005DAG(A2)&"-"&MAAND(C$1)&"-"&$A$1 = "31-1-2005"
WEEKDAG(DAG(A2)&"-"&MAAND(C$1)&"-"&$A$1)=WEEKDAG("31-1-2005")WEEKDAG may also contain a second parameter, which is supposed to be a number. The default value is 1.
1 => Sunday is the first day of the week. Sunday=1, Saturday=7.
2 => Monday is the first day of the week. Monday=1, Sunday=7.
3 => Monday is the first day of the week. Monday=0, Sunday=6.
In this case 1 seems to be what we are looking for, so it's OK as it is.
Now I can see why I get Err: 502. It's because I have a different language setting which affects the date format. I modified the formlua to my system's date format (ISO 8601, which looks like yyyy-mm-dd), so I guess that 31-1-2005 works on yours. Still, 31 is not what we are after, is it? So replace DAG(A2) with just A2 and we get: WEEKDAG("1-1-2005"). So far so good.
Now, the TEKST function and the "ddd" format. This format outputs the weekday in a two letter format, like "su", "mo" with English language settings. Therefor the DEEL function is unnecessary.
So the main problem seems to be that you entered DAG(A2) instead of just A2.
I modified the formula and I verified that I got the right days of week, after I modified the date format, so in my case it looks like this(in Swedish, but probably not very hard to understand):
=TEXT(VECKODAG($A$1&"-"&MÅNAD(C$1)&"-"&A2);"ddd")
On your system it should look like this: =TEKST(WEEKDAG(A2&"-"&MAAND(C$1)&"-"&$A$1);"ddd")
If you used the "dddd" format instead of "ddd", you would need the DEEL function, like you did, in this case:
=DEEL(TEKST(WEEKDAG(A2&"-"&MAAND(C$1)&"-"&$A$1);"dddd");1;2)
I didn't try this, but it should give the same result as the shorter one above, but why use unnecessary functions?
This should really work.
There is ONE problem with both of these: In your table you assume that every month has 31 days. When a day occurs, that does not exist, you get Err: 502.
I found a solution for this. As a "bonus", my solution works what ever your language settings are (I think). I try to attach it to this message and hopefully it will get thru, if not I guess I could send it to you personally.
Here is my solution anyway: Instead of just typing dates like 1 2 3 4....29 30 31, I do like this: A1=2005, just like in your example. A2=DATE($A$1;MONTH(C$1);1) A3=A2+1 A4=A3+1 and so on until A32=A31+1
B2=TEXT(WEEKDAY(A2);"ddd") B3=TEXT(WEEKDAY(A3);"ddd")
Note: As I have the Swedish version I am not sure about the English function names and I am even less sure about the function names in your language (Dutch?), so those function names above are my own GUESSED translations... That doesn't matter much if the attached document gets through, however.
Hope this helps.
Johnny
jan <[EMAIL PROTECTED]> skrev den Thu, 05 May 2005 12:21:41 +0200:
hello my englisch is not so good i am sorry. i have a program birdday excel if i used this in open office then things are change manday is sutterday this things with the same eh ... i show you
=DEEL(TEKST(WEEKDAG(DAG(A2)&"-"&MAAND(C$1)&"-"&$A$1);"ddd");1;2)
=DEEL(TEKST(WEEKDAG(DAG(A2)&"-"&MAAND(C$1)&"-"&$A$1);"ddd");1;2)
=DEEL(TEKST(WEEKDAG(DAG(M4)&"-"&MAAND(O$1)&"-"&$A$1);"ddd");1;2)
=DEEL(TEKST(WEEKDAG(DAG(M4)&"-"&MAAND(O$1)&"-"&$A$1);"ddd");1;2)
so maby you no it thanks jan lespau
-- Johnny
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
