og som VBA: Importeret dato i Kolonne A - redigeret i kolone B
Dim antalRæk As Long, dato As Date, ræk As Long Dim ugensDage As Variant Public Sub konverterDato() ugensDage = Array("", "Man", "Tir", "Ons", "Tor", "Fre", "Lør", "Søn") antalRæk = ActiveCell.SpecialCells(xlLastCell).Row
For ræk = 1 To antalRæk dato = arrangerDato(Range("A" & ræk)) ugedag = ugensDage(Weekday(dato, vbMonday))
Range("B" & ræk) = ugedag & Format(dato, "-mm-dd") Next ræk End Sub Private Function arrangerDato(dato) arrangerDato = Right(dato, 2) & "-" & Mid(dato, 5, 2) & "-" & Left(dato, 4) End Function
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.