![]() |
Need macro to parse function into longhand
Has anyone parsed a function to change divides into horizontal bars to
make it look more readable? ie make it look more like MathCAD functions, so simple errors like a misplaced bracket would be more obvious. I was thinking you could redraw the function in some free cells, but it could be text only, as it is only a visual aid to document the embedded equation. Steve |
Need macro to parse function into longhand
Steve,
Something like this ?... '------------------------------------ 'Replaces left and right parenthesis with brackets. 'In this example the formula in Cell C6 is displayed 'in Cell E6 with the replaced characters. 'Note: '1. In the second substitution, '"strFormula" is replaced with "strAnswer". '2. "'" is a single quote mark enclosed in " " Sub MakeItUnderstandable() Dim strAnswer As String Dim strFormula As String strFormula = Range("C6").Formula strAnswer = "'" & Application.Substitute(strFormula, "(", "[") strAnswer = Application.Substitute(strAnswer, ")", "]") Range("E6").Value = strAnswer End Sub '--------------------------------------- Regards, Jim Cone San Francisco, USA "steve" wrote in message ... Has anyone parsed a function to change divides into horizontal bars to make it look more readable? ie make it look more like MathCAD functions, so simple errors like a misplaced bracket would be more obvious. I was thinking you could redraw the function in some free cells, but it could be text only, as it is only a visual aid to document the embedded equation. Steve |
All times are GMT +1. The time now is 08:52 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com