ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   is there a way to change formulas to values for sorting purposes? (https://www.excelbanter.com/excel-worksheet-functions/43606-there-way-change-formulas-values-sorting-purposes.html)

Change formulas to values

is there a way to change formulas to values for sorting purposes?
 


Biff

Hi!

Select the cells with the formulas.

EditCopy then EditPaste SpecialValues

Biff

"Change formulas to values" <Change formulas to
wrote in message
...




Bryan Hessey


Hi,

ps, save your Workbook before you play with Macros, and as a different
name afterwards.

To change the H column to reflect the formula in column B is

For i = 1 To 100
Range("H" & i).Value = "'" & Range("b" & i).Formula
Next i

To put that into a macro, select Tools, Macro, Record new macro,
select a cell, then end the macro recorder.
then, Tools, Macro, Macros, select the macro and Edit.

Copy the code, and amend the For i = 1 to 100 to show the rows where
you wish this to happen, amend the columns H & B to be where you want
the formula to show (a spare column) and where the formula was.
Run the macro.

Hope this helps

Change formulas to values Wrote:


is there a way to change formulas to values for sorting purposes?


--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=401367


.

Bryan Hessy wrote:

Change formulas to values Wrote:


is there a way to change formulas to values for sorting purposes?


The Sort command (Data-Sort) treats formulas as values. Have you
tried sorting your data as is?



All times are GMT +1. The time now is 04:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com