Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default A macro for converting formulas to formula results only

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 834
Default A macro for converting formulas to formula results only

For Each cell In Range("A10:C200")

If cell.Value2 0 Then

cell.Value2 = cell.Value2
End If
Next cell

--

HTH

Bob

"Michael Lanier" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default A macro for converting formulas to formula results only

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

"Michael Lanier" wrote in message
...
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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default A macro for converting formulas to formula results only

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
creating a formula on one sheet that uses results of formulas on o gwendy Excel Worksheet Functions 3 March 14th 08 11:38 PM
Converting Formula Results to Actual Data Values RSJ145 Excel Discussion (Misc queries) 5 May 16th 07 01:56 AM
converting results from formula to text in a new column nodotdak New Users to Excel 3 November 22nd 06 04:48 PM
Display results of formulas not the actual formula Bridget from ATL Excel Discussion (Misc queries) 3 August 9th 06 03:40 PM
converting formulas into values using a macro in visual basic edit F.C[_2_] Excel Programming 1 August 28th 05 09:52 AM


All times are GMT +1. The time now is 04:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"