View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Another Macro Question

Maybe,

Right click the sheet tab, view code and paste this in

Sub marine()
lr = Cells(Rows.Count, "O").End(xlUp).Row
Set myrange = Range("O4:O" & lr)
For Each r In myrange
If Not IsEmpty(r) And IsNumeric(r) Then
r.Offset(, 1).Formula = "=" & r.Address & "*.75"
End If
Next
End Sub

Mike

"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!