vorausgesetzt, der Faktor befindet sich in Zelle G1, folgendes Makro:
Sub ErhoehenUndFormatieren()
Dim C As Range
Dim i%, lZeile%
lZeile = Cells(Rows.Count, 6).End(xlUp).Row
[g1].Copy
Range("F5:F" & lZeile).PasteSpecial _
Paste:=xlValues, _
Operation:=xlMultiply, _
SkipBlanks:=False, _
Transpose:=False
For i = 5 To lZeile
Set C = Cells(i, 6)
Select Case Cells(i, 6)
Case Is <= 20
C = WorksheetFunction.Round(C, 2)
Case Is <= 50
C = WorksheetFunction.Round(C / 5, 2) * 5
Case Is <= 100
C = WorksheetFunction.Round(C / 10, 2) * 10
Case Is <= 500
C = WorksheetFunction.Round(C / 50, 2) * 50
Case Else
C = WorksheetFunction.Round(C / 100, 2) * 100
End Select
Next i
Application.CutCopyMode = False
End Sub
Bei XL5/7 muß "WorksheetFunction" durch "Application" ersetzt werden.
hans
########################################################
# Herber's Excel-Server - letztes Update: 24.08.98 #
# http://www.herber.de - Microsoft MVP - Excel #
# Neu bei der Freeware: Bundesligatabelle #
# Excel-NG-Autoren: http://www.herber.de/dejanews.htm #
########################################################
Richard Reif <rei...@ina.de> wrote in message
01bdcf47$d535c360$05b3339f@pc00086...
Hans W. Herber <her...@herber.de> schrieb im Beitrag
<O5f0rS2...@uppssnewspub04.moswest.msn.net>...