Another Macro Question
Do you need the formula =cell * .75....no SUM necessary BTW?
What is address(es) of "cell"?
How about just do the math on filled cells in column O without a formula?
Sub test()
Dim rng As Range
Dim rng2 As Range
Set rng2 = Range(Range("O4"), Cells(Rows.Count, "O").End(xlUp))
For Each rng In rng2
If rng < "" Then
With rng
.Value = .Value * 0.75
End With
End If
Next rng
End Sub
Gord Dibben MS Excel MVP
On Fri, 8 Aug 2008 13:26:02 -0700, igotquestions
wrote:
First of all, what would be a good book to get to help a new user with
learning how to create macros for Excel? The Dummies books don't seem to help
with the more advanced functions.
Next I want to apply a formula to a range of cells in a column. I have
successfully done this but my range of cells is o4:o330. The problem is that
it puts 0 in all the cells below the cell with the last value in it.
The scenario I am dealing with is this:
I need to apply the formula =sum(cell*.75) to only the cells with values in
them in column o starting with o4 (o4 is the starting cell for all of my
values)
Special Thanks again to Don and Mike for their help with my previous question!
|