Bekijk bijlage Beta.xlsmBekijk bijlage Beta.xlsm
Heb het er in gezet hopelijk kan een beetje duidelijk over komen
Heb het er in gezet hopelijk kan een beetje duidelijk over komen
Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
Privacywetgeving
Het is bij Helpmij.nl niet toegestaan om persoonsgegevens in een voorbeeld te plaatsen. Alle voorbeelden die persoonsgegevens bevatten zullen zonder opgaaf van reden verwijderd worden. In de vraag zal specifiek vermeld moeten worden dat het om fictieve namen gaat.
Function CoppersToMoney(Coppers [COLOR=#0000ff]As Double[/COLOR], Optional teken, Optional total As Long) As String
' This function will format a number (value) into WoW Gold/Silver/Copper values
' The INPUT is any number (value) (...that isn't too big to kill Excel)
' The OUTPUT is a "(x)g (y)s (z)c" WoW currency formatted string
' Tell Excel to recalculate this value if/when other cells change
' by making sure it is defined as "volatile"
Application.Volatile (True)
' Declare vars
' (Using Long to possibly avoid overflow if the string has a very large number to parse)
Dim iCopper As [COLOR=#0000ff]Double[/COLOR]
Dim iSilver As[COLOR=#0000ff] Double[/COLOR]
Dim iGold As[COLOR=#0000ff] Double[/COLOR]
' Crunch numbers
If Not IsMissing(teken) Then
iGold = Int(Evaluate(Join(Array([COLOR=#0000ff](Coppers * 10000)[/COLOR], teken, IIf(total = 0, 1, total)))) / 10000)
iSilver = Int((Evaluate(Join(Array([COLOR=#0000ff](Coppers * 10000)[/COLOR], teken, IIf(total = 0, 1, total)))) - (iGold * 10000)) / 100)
iCopper = Int((Evaluate(Join(Array([COLOR=#0000ff](Coppers * 10000)[/COLOR], teken, IIf(total = 0, 1, total)))) - (iGold * 10000) - (iSilver * 100)))
Else
iGold = Int([COLOR=#0000ff]Coppers[/COLOR])
iSilver = Int(([COLOR=#0000ff](Coppers * 10000)[/COLOR] - (iGold * 10000)) / 100)
iCopper = Int(([COLOR=#0000ff](Coppers * 10000)[/COLOR] - (iGold * 10000) - (iSilver * 100)))
End If
' Return the full formatted string
CoppersToMoney = iGold & "g " & iSilver & "s " & iCopper & "c"
'Finish:
End Function
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.