Gruppe
Feature
Problem
Über Dropdownfeld-Auswahl in Zelle E2 werden die Werte aus der ausgeblendeten Spalte A wahlweise in EURO oder USD dargestellt.
StandardModule: basMain
Sub Zufall()
Dim rngA As Range
Dim iRow As Integer, iZufall As Integer
Randomize
iRow = Selection.Rows.Count
Columns(2).ClearContents
For Each rngA In Selection.Cells
iZufall = Int((iRow * Rnd) + 1)
Do While Not IsEmpty(Cells(iZufall, 2))
iZufall = Int((iRow * Rnd) + 1)
Loop
Cells(iZufall, 2).Value = rngA.Value
Next rngA
End Sub