From: Michael Lanier on
I need a macro that will convert a cell's formula to reflect its
formula result only based on the following:

Range is A10:C200
Only when formula's result > 0
Execute upon closing the file

Thanks for any help you can provide.

Michael
From: Bob Phillips on
For Each cell In Range("A10:C200")

If cell.Value2 > 0 Then

cell.Value2 = cell.Value2
End If
Next cell

--

HTH

Bob

"Michael Lanier" <michaelrlanier(a)gmail.com> wrote in message
news:4e59c63e-158f-4f39-9310-52511fec6ae2(a)k33g2000yqc.googlegroups.com...
>I need a macro that will convert a cell's formula to reflect its
> formula result only based on the following:
>
> Range is A10:C200
> Only when formula's result > 0
> Execute upon closing the file
>
> Thanks for any help you can provide.
>
> Michael


From: Don Guillett on
Sub convertformulas()
Dim c As Range
For Each c In Range("p3:p8").SpecialCells(xlCellTypeFormulas)
If c > 0 Then c.Value = c.Value
Next c
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett(a)gmail.com
"Michael Lanier" <michaelrlanier(a)gmail.com> wrote in message
news:4e59c63e-158f-4f39-9310-52511fec6ae2(a)k33g2000yqc.googlegroups.com...
>I need a macro that will convert a cell's formula to reflect its
> formula result only based on the following:
>
> Range is A10:C200
> Only when formula's result > 0
> Execute upon closing the file
>
> Thanks for any help you can provide.
>
> Michael

From: Michael Lanier on
Bob and Don,

I did something wrong with Bob's so I failed to get it to work but
Don's worked fine. Thank you both for your time.

Michael