View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Can I apply a discount across a complete workbook?

Select the cells that you want to discount and run this macro:

Sub discount()
' gsnuxx
s1 = "=("
s2 = ")*.7"
For Each r In Selection
If IsEmpty(r) Then
Else
v = r.Formula
If Left(v, 1) = "=" Then
v = Right(v, Len(v) - 1)
End If
r.Formula = s1 & v & s2
End If
Next
End Sub

Then continue with the next worksheet in the workbook.
--
Gary''s Student - gsnu200829


"Pauliexjr" wrote:

I have a price list created in Excel and I need to apply a 30% discount
across the entire range. As a lot of the prices are composed of other figures
within the workbook most cells contain macros, so I can't just cut and paste
as the macros corrupt. I have in excess of 400 prices to update so one cell
at a time is going to take forever!