Jump to content

Excel: Difference between revisions

From PhantomWiki
start with a bit more...
test
Line 1: Line 1:
Wiki Pages
==== VBA highlighting test ====


== Excel ==
<syntaxhighlight lang="vba">
__TOC__
Sub HelloWorld()


‎<syntaxhighlight lang="VBScript">cells(row, column)</syntaxhighlight>
    Dim message
    message = "Hello from VBA!" ' comment
   
    MsgBox message


== Formulas, etc ==
End Sub
 
</syntaxhighlight>
=== Format Date Range Output ===
* A2: The name of the event
* C2: Start Date
* D2: End Date
* E2: city
* TYPE is the kind of event
 
This will format as follows:
* If one day
*: <code>Event (TYPE) - City (dd mmmm yyyy)</code>
* If range in same month:
*: <code>Event (TYPE) - City (dd - dd mmmm yyyy)</code>
* If range is over different months in same year:
*: <code>Event (TYPE) - City (dd mmm - dd mmmm yyyy)</code>
* If Event spans over more than one year:
*: <code>Event (TYPE) - City (dd mmm yyyy - dd mmmm yyyy)</code>
 
‎

Revision as of 12:56, 8 September 2026

VBA highlighting test

Sub HelloWorld()

    Dim message
    message = "Hello from VBA!" ' comment
    
    MsgBox message

End Sub